# HG changeset patch # User Richard M. Stallman # Date 1134698562 0 # Node ID ce27da2c8c63716ece393f4ee220702ca3458a83 # Parent 9a94da622aa01af52e2e383209f2b7833a481405 (flyspell-external-point-words): Use save-excursion to ensure we don't move backward in the search loop, not even one character. (flyspell-delete-all-overlays): Use remove-overlays directly. diff -r 9a94da622aa0 -r ce27da2c8c63 lisp/textmodes/flyspell.el --- a/lisp/textmodes/flyspell.el Fri Dec 16 02:00:02 2005 +0000 +++ b/lisp/textmodes/flyspell.el Fri Dec 16 02:02:42 2005 +0000 @@ -1332,10 +1332,9 @@ (while keep (if (search-forward word flyspell-large-region-end t) - (progn + (save-excursion (goto-char (- (point) 1)) - (let* ((match-point (point)) ; flyspell-get-word might move it - (flyword-prev-l (flyspell-get-word nil)) + (let* ((flyword-prev-l (flyspell-get-word nil)) (flyword-prev (car flyword-prev-l)) (size-match (= (length flyword-prev) (length word)))) (when (or @@ -1362,7 +1361,7 @@ (setq keep nil) (flyspell-word) ;; Next search will begin from end of last match - (setq flyspell-large-region-beg match-point)))) + ))) ;; Record if misspelling is not found and try new one (add-to-list 'words-not-found (concat " -> " word " - " @@ -1558,7 +1557,7 @@ (defun flyspell-delete-all-overlays () "Delete all the overlays used by flyspell." - (flyspell-delete-region-overlays (point-min) (point-max))) + (remove-overlays (point-min) (point-max) 'flyspell-overlay t)) ;;*---------------------------------------------------------------------*/ ;;* flyspell-unhighlight-at ... */