changeset 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 68b1f44209a9
children 569977930fab
files lisp/textmodes/flyspell.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/flyspell.el	Mon Aug 27 13:41:54 2007 +0000
+++ b/lisp/textmodes/flyspell.el	Mon Aug 27 16:25:49 2007 +0000
@@ -485,7 +485,10 @@
   :keymap flyspell-mode-map
   :group 'flyspell
   (if flyspell-mode
-      (flyspell-mode-on)
+      (condition-case ()
+	  (flyspell-mode-on)
+	(error (message "Enabling Flyspell mode gave an error")
+	       (flyspell-mode -1)))
     (flyspell-mode-off)))
 
 ;;;###autoload