From: Richard M. Stallman Date: Sun, 27 Feb 2005 10:36:38 +0000 (+0000) Subject: (flyspell-mode-on): Call ispell-change-dictionary only if necessary. X-Git-Tag: ttn-vms-21-2-B4~2093 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8ceb0c6ea944fb3422896fdcbcbaf05fc071e627;p=emacs.git (flyspell-mode-on): Call ispell-change-dictionary only if necessary. --- diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 01db2d64b27..c224a970e01 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -543,8 +543,9 @@ in your .emacs file. "Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead." (setq ispell-highlight-face 'flyspell-incorrect-face) ;; local dictionaries setup - (ispell-change-dictionary - (or ispell-local-dictionary ispell-dictionary flyspell-default-dictionary)) + (or ispell-local-dictionary ispell-dictionary + (if flyspell-default-dictionary + (ispell-change-dictionary flyspell-default-dictionary))) ;; we have to force ispell to accept the local definition or ;; otherwise it could be too late, the local dictionary may ;; be forgotten!