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.
:type '(repeat regexp))
(defun visible-mark-initialize-overlays ()
- (mapc 'delete-overlay visible-mark-overlays)
+ (mapc
+ (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))))