comparison lisp/textmodes/flyspell.el @ 78685:81b279307e4b

(flyspell-mode): Catch errors in flyspell-mode-on.
author Richard M. Stallman <rms@gnu.org>
date Mon, 27 Aug 2007 16:25:49 +0000
parents 80e300a489d6
children dc100f64b2b7 5039706521c9
comparison
equal deleted inserted replaced
78684:68b1f44209a9 78685:81b279307e4b
483 \\[flyspell-buffer] checks the whole buffer." 483 \\[flyspell-buffer] checks the whole buffer."
484 :lighter flyspell-mode-line-string 484 :lighter flyspell-mode-line-string
485 :keymap flyspell-mode-map 485 :keymap flyspell-mode-map
486 :group 'flyspell 486 :group 'flyspell
487 (if flyspell-mode 487 (if flyspell-mode
488 (flyspell-mode-on) 488 (condition-case ()
489 (flyspell-mode-on)
490 (error (message "Enabling Flyspell mode gave an error")
491 (flyspell-mode -1)))
489 (flyspell-mode-off))) 492 (flyspell-mode-off)))
490 493
491 ;;;###autoload 494 ;;;###autoload
492 (defun turn-on-flyspell () 495 (defun turn-on-flyspell ()
493 "Unconditionally turn on Flyspell mode." 496 "Unconditionally turn on Flyspell mode."