aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1998-09-04 20:02:13 +0000
committerKarl Heuer1998-09-04 20:02:13 +0000
commitca2ebe63eba27e234394e9c5c20229dcdce87b33 (patch)
treea7590b768b85f259acea8d9225ab67d60b5ae4de
parent452b2285752ce73265424f56a684ad5c8ee9755a (diff)
downloademacs-ca2ebe63eba27e234394e9c5c20229dcdce87b33.tar.gz
emacs-ca2ebe63eba27e234394e9c5c20229dcdce87b33.zip
(flyspell-mode): Do nothing if mode
remains on or remains off. (flyspell-multi-language-p): Default changed to nil.
-rw-r--r--lisp/textmodes/flyspell.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 4035cf57071..43ddf8bea73 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -133,7 +133,7 @@ Each function is given two arguments: the beginning and the end
133of the incorrect region." 133of the incorrect region."
134 :group 'flyspell) 134 :group 'flyspell)
135 135
136(defcustom flyspell-multi-language-p t 136(defcustom flyspell-multi-language-p nil
137 "*Non-nil means that Flyspell can be used with multiple languages. 137 "*Non-nil means that Flyspell can be used with multiple languages.
138This mode works by starting a separate Ispell process for each buffer, 138This mode works by starting a separate Ispell process for each buffer,
139so that each buffer can use its own language." 139so that each buffer can use its own language."
@@ -289,14 +289,17 @@ flyspell-region checks all words inside a region.
289 289
290flyspell-buffer checks the whole buffer." 290flyspell-buffer checks the whole buffer."
291 (interactive "P") 291 (interactive "P")
292 ;; we set the mode on or off 292 (let ((old-flyspell-mode flyspell-mode))
293 (setq flyspell-mode (not (or (and (null arg) flyspell-mode) 293 ;; Mark the mode as on or off.
294 (<= (prefix-numeric-value arg) 0)))) 294 (setq flyspell-mode (not (or (and (null arg) flyspell-mode)
295 (if flyspell-mode 295 (<= (prefix-numeric-value arg) 0))))
296 (flyspell-mode-on) 296 ;; Do the real work.
297 (flyspell-mode-off)) 297 (unless (eq flyspell-mode old-flyspell-mode)
298 ;; we force the modeline re-printing 298 (if flyspell-mode
299 (set-buffer-modified-p (buffer-modified-p))) 299 (flyspell-mode-on)
300 (flyspell-mode-off))
301 ;; Force modeline redisplay.
302 (set-buffer-modified-p (buffer-modified-p)))))
300 303
301;*---------------------------------------------------------------------*/ 304;*---------------------------------------------------------------------*/
302;* flyspell-mode-on ... */ 305;* flyspell-mode-on ... */