Variable: hl-line-mode
hl-line-mode is a buffer-local variable defined in hl-line.el.gz.
Documentation
Non-nil if Hl-Line mode is enabled.
Use the command hl-line-mode(var)/hl-line-mode(fun) to change this variable.
Probably introduced at or before Emacs version 21.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/hl-line.el.gz
;;;###autoload
(define-minor-mode hl-line-mode
"Toggle highlighting of the current line (Hl-Line mode).
Hl-Line mode is a buffer-local minor mode. If
`hl-line-sticky-flag' is non-nil, Hl-Line mode highlights the
line about the buffer's point in all windows. Caveat: the
buffer's point might be different from the point of a
non-selected window. Hl-Line mode uses the function
`hl-line-highlight' on `post-command-hook' in this case.
When `hl-line-sticky-flag' is nil, Hl-Line mode highlights the
line about point in the selected window only."
:group 'hl-line
(if hl-line-mode
(progn
;; In case `kill-all-local-variables' is called.
(add-hook 'change-major-mode-hook #'hl-line-unhighlight nil t)
(hl-line-highlight)
(setq hl-line-overlay-buffer (current-buffer))
(add-hook 'post-command-hook #'hl-line-highlight nil t))
(remove-hook 'post-command-hook #'hl-line-highlight t)
(hl-line-unhighlight)
(remove-hook 'change-major-mode-hook #'hl-line-unhighlight t)))