Variable: linum-mode
linum-mode is a buffer-local variable defined in linum.el.gz.
Documentation
Non-nil if Linum mode is enabled.
Use the command linum-mode(var)/linum-mode(fun) to change this variable.
Probably introduced at or before Emacs version 26.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/linum.el.gz
;;;###autoload
(define-minor-mode linum-mode
"Toggle display of line numbers in the left margin (Linum mode).
Linum mode is a buffer-local minor mode."
:lighter "" ; for desktop.el
:append-arg-docstring t
(if linum-mode
(progn
(if linum-eager
(add-hook 'post-command-hook (if linum-delay
'linum-schedule
'linum-update-current) nil t)
(add-hook 'after-change-functions 'linum-after-change nil t))
(add-hook 'window-scroll-functions 'linum-after-scroll nil t)
;; Using both window-size-change-functions and
;; window-configuration-change-hook seems redundant. --Stef
;; (add-hook 'window-size-change-functions 'linum-after-size nil t)
(add-hook 'change-major-mode-hook 'linum-delete-overlays nil t)
(add-hook 'window-configuration-change-hook
;; FIXME: If the buffer is shown in N windows, this
;; will be called N times rather than once. We should use
;; something like linum-update-window instead.
'linum-update-current nil t)
(linum-update-current))
(remove-hook 'post-command-hook 'linum-update-current t)
(remove-hook 'post-command-hook 'linum-schedule t)
;; (remove-hook 'window-size-change-functions 'linum-after-size t)
(remove-hook 'window-scroll-functions 'linum-after-scroll t)
(remove-hook 'after-change-functions 'linum-after-change t)
(remove-hook 'window-configuration-change-hook 'linum-update-current t)
(remove-hook 'change-major-mode-hook 'linum-delete-overlays t)
(linum-delete-overlays)))