Disable bell and avoid flyspell-errors.

This commit is contained in:
Lars Tveito 2014-01-02 16:32:31 +01:00
parent 98dbd3303a
commit 0baec2b264
2 changed files with 32 additions and 2 deletions

11
init.el
View File

@ -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))

View File

@ -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.
)
@ -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