# HG changeset patch # User Richard M. Stallman # Date 1130687527 0 # Node ID 0a53832a48cee8d816f232c4bc256c688d0fc7d1 # Parent 64988dc866191ee67fd8ecebfb67331a7ac7321a (flyspell-external-point-words): Detect when WORD can't be checked properly because flyspell-get-word finds just part of it, and move on. diff -r 64988dc86619 -r 0a53832a48ce lisp/textmodes/flyspell.el --- 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