emacs-diffs
[Top][All Lists]
Advanced

[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: Sun, 15 Jan 2006 05:46:22 +0000

Index: emacs/lisp/textmodes/flyspell.el
diff -u emacs/lisp/textmodes/flyspell.el:1.94 
emacs/lisp/textmodes/flyspell.el:1.95
--- emacs/lisp/textmodes/flyspell.el:1.94       Thu Jan  5 21:52:15 2006
+++ emacs/lisp/textmodes/flyspell.el    Sun Jan 15 05:46:20 2006
@@ -525,6 +525,11 @@
             (member (or ispell-local-dictionary ispell-dictionary)
                     
flyspell-dictionaries-that-consider-dash-as-word-delimiter)))))
 
+(defun flyspell-kill-ispell-hook ()
+  (setq flyspell-last-buffer nil)
+  (dolist (buf (buffer-list))
+    (kill-local-variable 'flyspell-word-cache-word)))
+
 ;;*---------------------------------------------------------------------*/
 ;;*    flyspell-mode-on ...                                             */
 ;;*---------------------------------------------------------------------*/
@@ -536,6 +541,8 @@
   (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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]