aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2006-01-05 21:52:16 +0000
committerStefan Monnier2006-01-05 21:52:16 +0000
commitbef9f82ccf659ad83c81b21f92976150c4a09647 (patch)
tree7dfc26eb1130d1ec98191cf4e0b177b4db2f40c2 /lisp
parent2d90e492e73154599800bc922a439a364051f379 (diff)
downloademacs-bef9f82ccf659ad83c81b21f92976150c4a09647.tar.gz
emacs-bef9f82ccf659ad83c81b21f92976150c4a09647.zip
(flyspell-accept-buffer-local-defs): Add an
argument `force' to disable the flyspell-last-buffer optimization. (flyspell-mode-on): Use it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/textmodes/flyspell.el10
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fca098b1b3e..09109667c5f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12006-01-05 Stefan Monnier <monnier@iro.umontreal.ca> 12006-01-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * textmodes/flyspell.el (flyspell-accept-buffer-local-defs): Add an
4 argument `force' to disable the flyspell-last-buffer optimization.
5 (flyspell-mode-on): Use it.
6
3 * progmodes/flymake.el (flymake-get-cleanup-function): Default to 7 * progmodes/flymake.el (flymake-get-cleanup-function): Default to
4 flymake-simple-cleanup. 8 flymake-simple-cleanup.
5 (flymake-allowed-file-name-masks): Use this new default. 9 (flymake-allowed-file-name-masks): Use this new default.
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 33582af28b9..39d4b1f7b69 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1,7 +1,7 @@
1;;; flyspell.el --- on-the-fly spell checker 1;;; flyspell.el --- on-the-fly spell checker
2 2
3;; Copyright (C) 1998, 2000, 2002, 2003, 2004, 3;; Copyright (C) 1998, 2000, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc. 4;; 2005, 2006 Free Software Foundation, Inc.
5 5
6;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr> 6;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr>
7;; Maintainer: FSF 7;; Maintainer: FSF
@@ -504,11 +504,11 @@ in your .emacs file.
504(defvar flyspell-last-buffer nil 504(defvar flyspell-last-buffer nil
505 "The buffer in which the last flyspell operation took place.") 505 "The buffer in which the last flyspell operation took place.")
506 506
507(defun flyspell-accept-buffer-local-defs () 507(defun flyspell-accept-buffer-local-defs (&optional force)
508 ;; When flyspell-word is used inside a loop (e.g. when processing 508 ;; When flyspell-word is used inside a loop (e.g. when processing
509 ;; flyspell-changes), the calls to `ispell-accept-buffer-local-defs' end 509 ;; flyspell-changes), the calls to `ispell-accept-buffer-local-defs' end
510 ;; up dwarfing everything else, so only do it when the buffer has changed. 510 ;; up dwarfing everything else, so only do it when the buffer has changed.
511 (unless (eq flyspell-last-buffer (current-buffer)) 511 (when (or force (not (eq flyspell-last-buffer (current-buffer))))
512 (setq flyspell-last-buffer (current-buffer)) 512 (setq flyspell-last-buffer (current-buffer))
513 ;; Strange problem: If buffer in current window has font-lock turned on, 513 ;; Strange problem: If buffer in current window has font-lock turned on,
514 ;; but SET-BUFFER was called to point to an invisible buffer, this ispell 514 ;; but SET-BUFFER was called to point to an invisible buffer, this ispell
@@ -539,7 +539,9 @@ in your .emacs file.
539 ;; we have to force ispell to accept the local definition or 539 ;; we have to force ispell to accept the local definition or
540 ;; otherwise it could be too late, the local dictionary may 540 ;; otherwise it could be too late, the local dictionary may
541 ;; be forgotten! 541 ;; be forgotten!
542 (flyspell-accept-buffer-local-defs) 542 ;; Pass the `force' argument for the case where flyspell was active already
543 ;; but the buffer's local-defs have been edited.
544 (flyspell-accept-buffer-local-defs 'force)
543 ;; we put the `flyspell-delayed' property on some commands 545 ;; we put the `flyspell-delayed' property on some commands
544 (flyspell-delay-commands) 546 (flyspell-delay-commands)
545 ;; we put the `flyspell-deplacement' property on some commands 547 ;; we put the `flyspell-deplacement' property on some commands