comparison lisp/textmodes/flyspell.el @ 60283:e55f542ec767

(flyspell-mode-on): Call ispell-change-dictionary only if necessary.
author Richard M. Stallman <rms@gnu.org>
date Sun, 27 Feb 2005 10:36:38 +0000
parents b838f6a6cb4d
children 7d534323afd2 e4694597cbf4
comparison
equal deleted inserted replaced
60282:b6fcc94c2d6a 60283:e55f542ec767
541 ;*---------------------------------------------------------------------*/ 541 ;*---------------------------------------------------------------------*/
542 (defun flyspell-mode-on () 542 (defun flyspell-mode-on ()
543 "Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead." 543 "Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead."
544 (setq ispell-highlight-face 'flyspell-incorrect-face) 544 (setq ispell-highlight-face 'flyspell-incorrect-face)
545 ;; local dictionaries setup 545 ;; local dictionaries setup
546 (ispell-change-dictionary 546 (or ispell-local-dictionary ispell-dictionary
547 (or ispell-local-dictionary ispell-dictionary flyspell-default-dictionary)) 547 (if flyspell-default-dictionary
548 (ispell-change-dictionary flyspell-default-dictionary)))
548 ;; we have to force ispell to accept the local definition or 549 ;; we have to force ispell to accept the local definition or
549 ;; otherwise it could be too late, the local dictionary may 550 ;; otherwise it could be too late, the local dictionary may
550 ;; be forgotten! 551 ;; be forgotten!
551 (flyspell-accept-buffer-local-defs) 552 (flyspell-accept-buffer-local-defs)
552 ;; we put the `flyspell-delayed' property on some commands 553 ;; we put the `flyspell-delayed' property on some commands