From: Chong Yidong Date: Tue, 26 Aug 2008 23:00:31 +0000 (+0000) Subject: (flyspell-check-pre-word-p): Make sure flyspell-pre-point is valid to X-Git-Tag: emacs-pretest-23.0.90~3253 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6797fabd2dc7edde08754d9be21048489dd378ee;p=emacs.git (flyspell-check-pre-word-p): Make sure flyspell-pre-point is valid to avoid signalling an error in post-command-hook. --- diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 6e78096328e..a67e48cec41 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -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))