da960bad95cbb37155e9ec46f8bfdc66f0131bf9 — John Foerch 11 years ago 03c4e72
more thorough job of deleting old overlays on startup

Before this patch, revert-buffer caused stale overlays to not get cleaned
up because it depended on visible-mark-overlays being valid.  However,
reverting the buffer wipes out local variables.
1 files changed, 5 insertions(+), 1 deletions(-)

M visible-mark.el
M visible-mark.el => visible-mark.el +5 -1
@@ 67,7 67,11 @@
  :type '(repeat regexp))
(defun visible-mark-initialize-overlays ()
  (mapc 'delete-overlay visible-mark-overlays)
   (lambda (x)
     (when (eq 'visible-mark (overlay-get x 'category))
       (delete-overlay x)))
   (overlays-in (point-min) (point-max)))  
  (let (overlays)
    (dotimes (i visible-mark-max)
      (let ((overlay (make-overlay (point-min) (point-min))))