]> code.delx.au - gnu-emacs/commitdiff
(flyspell-external-point-words):
authorRichard M. Stallman <rms@gnu.org>
Sun, 30 Oct 2005 15:52:07 +0000 (15:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 30 Oct 2005 15:52:07 +0000 (15:52 +0000)
Detect when WORD can't be checked properly because
flyspell-get-word finds just part of it, and move on.

lisp/textmodes/flyspell.el

index ee94ff01d64df9acdf3758cf39040e0dcb4c5226..253485fc87f68d1349e0a15e9aa6c15692ecf19a 100644 (file)
@@ -1356,7 +1356,14 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
                  (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