Function: linum-delete-overlays

linum-delete-overlays is a byte-compiled function defined in linum.el.gz.

Signature

(linum-delete-overlays)

Documentation

Delete all overlays displaying line numbers for this buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/linum.el.gz
(defun linum-delete-overlays ()
  "Delete all overlays displaying line numbers for this buffer."
  (mapc #'delete-overlay linum-overlays)
  (setq linum-overlays nil)
  (dolist (w (get-buffer-window-list (current-buffer) nil t))
    ;; restore margins if needed FIXME: This still fails if the
    ;; "other" mode has incidentally set margins to exactly what linum
    ;; had: see bug#20674 for a similar workaround in nlinum.el
    (let ((set-margins (window-parameter w 'linum--set-margins))
          (current-margins (window-margins w)))
      (when (and set-margins
                 (equal set-margins current-margins))
        (set-window-margins w 0 (cdr current-margins))
        (set-window-parameter w 'linum--set-margins nil)))))