diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-10-30 15:52:07 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-10-30 15:52:07 +0000 |
commit | 00a2681be87b3d97a5d9a472dac72f3d75cd2b04 (patch) | |
tree | 4f15747162eee2a882f6db43ad2099181ee62aa5 /lisp/textmodes/flyspell.el | |
parent | fb031ddd98574312121b8198614e82996b7e392d (diff) | |
download | emacs-00a2681be87b3d97a5d9a472dac72f3d75cd2b04.tar.gz |
(flyspell-external-point-words):
Detect when WORD can't be checked properly because
flyspell-get-word finds just part of it, and move on.
Diffstat (limited to 'lisp/textmodes/flyspell.el')
-rw-r--r-- | lisp/textmodes/flyspell.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index ee94ff01d64..253485fc87f 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -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 |