]> code.delx.au - gnu-emacs/commitdiff
After saving ispell dictionary, re-enable flyspell if necessary.
authorChong Yidong <cyd@gnu.org>
Sat, 13 Oct 2012 09:51:59 +0000 (17:51 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 13 Oct 2012 09:51:59 +0000 (17:51 +0800)
* lisp/textmodes/ispell.el (ispell-pdict-save): If flyspell-mode is
enabled, re-enable it.

Fixes: debbugs:11963
lisp/ChangeLog
lisp/textmodes/ispell.el

index 5ac455feb13e6205a94a3a959a15d99d41b683a2..d58eb0bfbbf86f7339b7f6dcd894e9b64ca81629 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-13  Chong Yidong  <cyd@gnu.org>
+
+       * textmodes/ispell.el (ispell-pdict-save): If flyspell-mode is
+       enabled, re-enable it (Bug#11963).
+
 2012-10-13  Martin Rudalics  <rudalics@gmx.at>
 
        * emacs-lisp/debug.el (debug): When debugger-will-be-back is
index 51a4800de52836ceb8ee681fbc5897f657779071..d591dc5fa85a47bc9375c3a4807387ac53774957 100644 (file)
@@ -1893,11 +1893,14 @@ If so, ask if it needs to be saved."
   (interactive (list ispell-silently-savep t))
   (if (and ispell-pdict-modified-p (listp ispell-pdict-modified-p))
       (setq ispell-pdict-modified-p (car ispell-pdict-modified-p)))
-  (if (or ispell-pdict-modified-p force-save)
-      (if (or no-query (y-or-n-p "Personal dictionary modified.  Save? "))
-         (progn
-           (ispell-send-string "#\n")  ; save dictionary
-           (message "Personal dictionary saved."))))
+  (when (and (or ispell-pdict-modified-p force-save)
+            (or no-query
+                (y-or-n-p "Personal dictionary modified.  Save? ")))
+    (ispell-send-string "#\n") ; save dictionary
+    (message "Personal dictionary saved.")
+    (when flyspell-mode
+      (flyspell-mode 0)
+      (flyspell-mode 1)))
   ;; unassert variable, even if not saved to avoid questioning.
   (setq ispell-pdict-modified-p nil))