hl-line

Homepage: https://www.gnu.org/software/emacs

Author: Dave Love

Summary

Highlight the current line

Commentary

Provides a local minor mode (toggled by M-x hl-line-mode) and
a global minor mode (toggled by M-x global-hl-line-mode) to
highlight, on a suitable terminal, the line on which point is.  The
global mode highlights the current line in the selected window only
(except when the minibuffer window is selected).  This was
implemented to satisfy a request for a feature of Lesser Editors.
The local mode is sticky: it highlights the line about the buffer's
point even if the buffer's window is not selected.  Caveat: the
buffer's point might be different from the point of a non-selected
window.  Set the variable `hl-line-sticky-flag' to nil to make the
local mode behave like the global mode.

You probably don't really want to use the global mode; if the
cursor is difficult to spot, try changing its color, relying on
`blink-cursor-mode' or both.  The hookery used might affect
response noticeably on a slow machine.  The local mode may be
useful in non-editing buffers such as Gnus or PCL-CVS though.

An overlay is used.  In the non-sticky cases, this overlay is
active only on the selected window.  A hook is added to
`post-command-hook' to activate the overlay and move it to the line
about point.

You could make variable `global-hl-line-mode' buffer-local and set
it to nil to avoid highlighting specific buffers, when the global
mode is used.

By default the whole line is highlighted.  The range of highlighting
can be changed by defining an appropriate function as the
buffer-local value of `hl-line-range-function'.

Reverse dependencies