]> git.eshelyaron.com Git - emacs.git/commitdiff
(flyspell-check-pre-word-p): Make sure flyspell-pre-point is valid to
authorChong Yidong <cyd@stupidchicken.com>
Tue, 26 Aug 2008 23:00:31 +0000 (23:00 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 26 Aug 2008 23:00:31 +0000 (23:00 +0000)
avoid signalling an error in post-command-hook.

lisp/textmodes/flyspell.el

index 6e78096328ea5dd0858591bf0f084a7db89a6c27..a67e48cec415aa018f11aae592ecf8fe7a8a5b38 100644 (file)
@@ -744,6 +744,9 @@ before the current command."
                  (eq flyspell-previous-command this-command)))
         (or (= (current-column) 0)
             (= (current-column) flyspell-pre-column)
+            ;; If other post-command-hooks change the buffer,
+            ;; flyspell-pre-point can lie past eob (bug#468).
+            (null (char-after flyspell-pre-point))
             (eq (char-syntax (char-after flyspell-pre-point)) ?w)))
     nil)
    ((not (eq (current-buffer) flyspell-pre-buffer))