Mercurial > emacs
diff lisp/textmodes/flyspell.el @ 66557:0a53832a48ce
(flyspell-external-point-words):
Detect when WORD can't be checked properly because
flyspell-get-word finds just part of it, and move on.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 30 Oct 2005 15:52:07 +0000 |
parents | 340b9157f283 |
children | 7a2cc9f4b600 |
line wrap: on
line diff
--- a/lisp/textmodes/flyspell.el Sun Oct 30 15:49:51 2005 +0000 +++ b/lisp/textmodes/flyspell.el Sun Oct 30 15:52:07 2005 +0000 @@ -1356,7 +1356,14 @@ (progn (setq flyspell-large-region-beg (point)) (goto-char (- (point) 1)) - (setq keep (flyspell-word))) + (setq keep + ;; Detect when WORD can't be checked properly + ;; because flyspell-get-word finds + ;; just part of it, and treat that as ok. + (if (< (length (flyspell-get-word following)) + (length word)) + nil + (flyspell-word)))) (error "Bug: misspelled word `%s' (output pos %d) not found in buffer" word wordpos))))))) ;; we are done