changeset 66930:bf55d63c7dd6

(flyspell-delete-region-overlays): Use remove-overlays.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 16 Nov 2005 16:07:47 +0000
parents 35f26e779968
children 1a573209abf9
files lisp/ChangeLog lisp/textmodes/flyspell.el
diffstat 2 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Nov 16 16:04:29 2005 +0000
+++ b/lisp/ChangeLog	Wed Nov 16 16:07:47 2005 +0000
@@ -1,5 +1,8 @@
 2005-11-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* textmodes/flyspell.el (flyspell-delete-region-overlays): Use
+	remove-overlays.
+
 	* calendar/diary-lib.el (diary-list-entries): Also hide the
 	terminating newline.
 
--- a/lisp/textmodes/flyspell.el	Wed Nov 16 16:04:29 2005 +0000
+++ b/lisp/textmodes/flyspell.el	Wed Nov 16 16:07:47 2005 +0000
@@ -1552,12 +1552,7 @@
 ;*---------------------------------------------------------------------*/
 (defun flyspell-delete-region-overlays (beg end)
   "Delete overlays used by flyspell in a given region."
-  (let ((l (overlays-in beg end)))
-    (while (consp l)
-      (progn
-	(if (flyspell-overlay-p (car l))
-	    (delete-overlay (car l)))
-	(setq l (cdr l))))))
+  (remove-overlays beg end 'flyspell-overlay t))
 
 
 (defun flyspell-delete-all-overlays ()