# HG changeset patch # User Chong Yidong # Date 1219791631 0 # Node ID 5c765f31d8e0d1d8a21e4b31d8d96f62412339b1 # Parent 1aac7c6d1cd8d2b29cff794ecda6ccd1836bfbf6 (flyspell-check-pre-word-p): Make sure flyspell-pre-point is valid to avoid signalling an error in post-command-hook. diff -r 1aac7c6d1cd8 -r 5c765f31d8e0 lisp/textmodes/flyspell.el --- a/lisp/textmodes/flyspell.el Tue Aug 26 23:00:18 2008 +0000 +++ b/lisp/textmodes/flyspell.el Tue Aug 26 23:00:31 2008 +0000 @@ -744,6 +744,9 @@ (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))