diff --git a/init.el b/init.el index 66f118b..c3368ed 100644 --- a/init.el +++ b/init.el @@ -75,6 +75,7 @@ PACKAGE is installed and the current version is deleted." (setq initial-scratch-message nil ; Clean scratch buffer. inhibit-startup-message t ; No splash screen please. default-input-method "TeX" ; Use TeX when toggeling input method. + ring-bell-function 'ignore ; Quite as a mouse. doc-view-continuous t ; At page edge goto next/previous. echo-keystrokes 0.1 ; Show keystrokes asap. ) @@ -260,6 +261,16 @@ PACKAGE is installed and the current version is deleted." (forward-sexp)) ad-do-it)) +(defadvice turn-on-flyspell (around check nil activate) + "Turns on flyspell only if a spell-checking tool is installed." + (when (executable-find ispell-program-name) + ad-do-it)) + +(defadvice flyspell-prog-mode (around check nil activate) + "Turns on flyspell only if a spell-checking tool is installed." + (when (executable-find ispell-program-name) + ad-do-it)) + (dolist (mode '(slime-repl-mode inferior-lisp-mode inferior-scheme-mode)) (add-to-list 'pretty-lambda-auto-modes mode)) diff --git a/init.org b/init.org index c63b13e..f1c5c90 100644 --- a/init.org +++ b/init.org @@ -143,6 +143,7 @@ (setq initial-scratch-message nil ; Clean scratch buffer. inhibit-startup-message t ; No splash screen please. default-input-method "TeX" ; Use TeX when toggeling input method. + ring-bell-function 'ignore ; Quite as a mouse. doc-view-continuous t ; At page edge goto next/previous. echo-keystrokes 0.1 ; Show keystrokes asap. ) @@ -170,7 +171,7 @@ (when (file-exists-p default-directory) (normal-top-level-add-to-load-path '(".")) (normal-top-level-add-subdirs-to-load-path))) - #+END_SRC + #+END_SRC Answering /yes/ and /no/ to each question from Emacs can be tedious, a single /y/ or /n/ will suffice. @@ -482,7 +483,7 @@ #+BEGIN_SRC emacs-lisp :tangle yes (global-set-key (kbd "C-c m") 'magit-status) #+END_SRC - + Bindings for [[https://github.com/winterTTr/ace-jump-mode][ace-jump-mode]]. #+BEGIN_SRC emacs-lisp :tangle yes @@ -531,6 +532,24 @@ ad-do-it)) #+END_SRC + =Flyspell= signals an error if there is no spell-checking tool is + installed. We can advice =turn-on=flyspell= and =flyspell-prog-mode= to + only try to enable =flyspell= if a spell-checking tool is avalible. + + #+BEGIN_SRC emacs-lisp :tangle yes + (defadvice turn-on-flyspell (around check nil activate) + "Turns on flyspell only if a spell-checking tool is installed." + (when (executable-find ispell-program-name) + ad-do-it)) + #+END_SRC + + #+BEGIN_SRC emacs-lisp :tangle yes + (defadvice flyspell-prog-mode (around check nil activate) + "Turns on flyspell only if a spell-checking tool is installed." + (when (executable-find ispell-program-name) + ad-do-it)) + #+END_SRC + * Language mode specific ** Lisp