Variable: global-hl-line-mode
global-hl-line-mode is a customizable variable defined in
hl-line.el.gz.
Value
nil
Documentation
Non-nil if Global Hl-Line mode is enabled.
See the global-hl-line-mode(var)/global-hl-line-mode(fun) command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node (emacs)Easy Customization)
or call the function global-hl-line-mode(var)/global-hl-line-mode(fun).
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 global-hl-line-mode
"Toggle line highlighting in all buffers (Global Hl-Line mode).
If `global-hl-line-sticky-flag' is non-nil, Global Hl-Line mode
highlights the line about the current buffer's point in all live
windows.
Global-Hl-Line mode uses the function `global-hl-line-highlight'
on `post-command-hook'."
:global t
:group 'hl-line
(if global-hl-line-mode
(progn
;; In case `kill-all-local-variables' is called.
(add-hook 'change-major-mode-hook #'global-hl-line-unhighlight)
(global-hl-line-highlight-all)
(add-hook 'post-command-hook #'global-hl-line-highlight))
(global-hl-line-unhighlight-all)
(remove-hook 'post-command-hook #'global-hl-line-highlight)
(remove-hook 'change-major-mode-hook #'global-hl-line-unhighlight)))