changeset 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 64988dc86619
children fadace302be8
files lisp/textmodes/flyspell.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
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