Mercurial > emacs
diff lisp/textmodes/flyspell.el @ 68237:aa1b3e649cc8
(ispell-kill-ispell-hook): Add to the hook when
loading the file rather than when turning on flyspell-mode.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 17 Jan 2006 16:35:52 +0000 |
parents | 979bd3539a58 |
children | e5fac4fecc67 d88caeac70d7 |
line wrap: on
line diff
--- a/lisp/textmodes/flyspell.el Tue Jan 17 16:20:29 2006 +0000 +++ b/lisp/textmodes/flyspell.el Tue Jan 17 16:35:52 2006 +0000 @@ -531,6 +531,11 @@ (with-current-buffer buf (kill-local-variable 'flyspell-word-cache-word)))) +;; Make sure we flush our caches when needed. Do it here rather than in +;; flyspell-mode-on, since flyspell-region may be used without ever turning +;; on flyspell-mode. +(add-hook 'ispell-kill-ispell-hook 'flyspell-kill-ispell-hook) + ;;*---------------------------------------------------------------------*/ ;;* flyspell-mode-on ... */ ;;*---------------------------------------------------------------------*/ @@ -542,8 +547,6 @@ (or ispell-local-dictionary ispell-dictionary (if flyspell-default-dictionary (ispell-change-dictionary flyspell-default-dictionary))) - ;; Make sure we flush our caches when needed. - (add-hook 'ispell-kill-ispell-hook 'flyspell-kill-ispell-hook) ;; we have to force ispell to accept the local definition or ;; otherwise it could be too late, the local dictionary may ;; be forgotten!