[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el |
Date: |
Tue, 17 Jan 2006 16:35:53 +0000 |
Index: emacs/lisp/textmodes/flyspell.el
diff -u emacs/lisp/textmodes/flyspell.el:1.96
emacs/lisp/textmodes/flyspell.el:1.97
--- emacs/lisp/textmodes/flyspell.el:1.96 Sun Jan 15 05:47:44 2006
+++ emacs/lisp/textmodes/flyspell.el Tue Jan 17 16:35:52 2006
@@ -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!