aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-10-13 17:51:59 +0800
committerChong Yidong2012-10-13 17:51:59 +0800
commit0d11ff1cf2c3af79a9c4e9ef437488b6469fca52 (patch)
tree5f984efc4f056a11e0071c3a08582ad64b1a86e2
parentb1367cba38b88b64530f40b1935b38a8c08f2fd6 (diff)
downloademacs-0d11ff1cf2c3af79a9c4e9ef437488b6469fca52.tar.gz
emacs-0d11ff1cf2c3af79a9c4e9ef437488b6469fca52.zip
After saving ispell dictionary, re-enable flyspell if necessary.
* lisp/textmodes/ispell.el (ispell-pdict-save): If flyspell-mode is enabled, re-enable it. Fixes: debbugs:11963
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/ispell.el13
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5ac455feb13..d58eb0bfbbf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-10-13 Chong Yidong <cyd@gnu.org>
2
3 * textmodes/ispell.el (ispell-pdict-save): If flyspell-mode is
4 enabled, re-enable it (Bug#11963).
5
12012-10-13 Martin Rudalics <rudalics@gmx.at> 62012-10-13 Martin Rudalics <rudalics@gmx.at>
2 7
3 * emacs-lisp/debug.el (debug): When debugger-will-be-back is 8 * emacs-lisp/debug.el (debug): When debugger-will-be-back is
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 51a4800de52..d591dc5fa85 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1893,11 +1893,14 @@ If so, ask if it needs to be saved."
1893 (interactive (list ispell-silently-savep t)) 1893 (interactive (list ispell-silently-savep t))
1894 (if (and ispell-pdict-modified-p (listp ispell-pdict-modified-p)) 1894 (if (and ispell-pdict-modified-p (listp ispell-pdict-modified-p))
1895 (setq ispell-pdict-modified-p (car ispell-pdict-modified-p))) 1895 (setq ispell-pdict-modified-p (car ispell-pdict-modified-p)))
1896 (if (or ispell-pdict-modified-p force-save) 1896 (when (and (or ispell-pdict-modified-p force-save)
1897 (if (or no-query (y-or-n-p "Personal dictionary modified. Save? ")) 1897 (or no-query
1898 (progn 1898 (y-or-n-p "Personal dictionary modified. Save? ")))
1899 (ispell-send-string "#\n") ; save dictionary 1899 (ispell-send-string "#\n") ; save dictionary
1900 (message "Personal dictionary saved.")))) 1900 (message "Personal dictionary saved.")
1901 (when flyspell-mode
1902 (flyspell-mode 0)
1903 (flyspell-mode 1)))
1901 ;; unassert variable, even if not saved to avoid questioning. 1904 ;; unassert variable, even if not saved to avoid questioning.
1902 (setq ispell-pdict-modified-p nil)) 1905 (setq ispell-pdict-modified-p nil))
1903 1906