Mercurial > emacs
comparison lisp/textmodes/flyspell.el @ 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 | 30d90742b0a8 |
children | 29c20df6248f |
comparison
equal
deleted
inserted
replaced
66929:35f26e779968 | 66930:bf55d63c7dd6 |
---|---|
1550 ;* ------------------------------------------------------------- */ | 1550 ;* ------------------------------------------------------------- */ |
1551 ;* Remove overlays introduced by flyspell. */ | 1551 ;* Remove overlays introduced by flyspell. */ |
1552 ;*---------------------------------------------------------------------*/ | 1552 ;*---------------------------------------------------------------------*/ |
1553 (defun flyspell-delete-region-overlays (beg end) | 1553 (defun flyspell-delete-region-overlays (beg end) |
1554 "Delete overlays used by flyspell in a given region." | 1554 "Delete overlays used by flyspell in a given region." |
1555 (let ((l (overlays-in beg end))) | 1555 (remove-overlays beg end 'flyspell-overlay t)) |
1556 (while (consp l) | |
1557 (progn | |
1558 (if (flyspell-overlay-p (car l)) | |
1559 (delete-overlay (car l))) | |
1560 (setq l (cdr l)))))) | |
1561 | 1556 |
1562 | 1557 |
1563 (defun flyspell-delete-all-overlays () | 1558 (defun flyspell-delete-all-overlays () |
1564 "Delete all the overlays used by flyspell." | 1559 "Delete all the overlays used by flyspell." |
1565 (flyspell-delete-region-overlays (point-min) (point-max))) | 1560 (flyspell-delete-region-overlays (point-min) (point-max))) |