From 6797fabd2dc7edde08754d9be21048489dd378ee Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 26 Aug 2008 23:00:31 +0000 Subject: [PATCH] (flyspell-check-pre-word-p): Make sure flyspell-pre-point is valid to avoid signalling an error in post-command-hook. --- lisp/textmodes/flyspell.el | 3 +++ 1 file changed, 3 insertions(+) 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)) -- 2.39.5