]> git.eshelyaron.com Git - emacs.git/commit
Rewrite hl-line-mode
authordickmao <dick.r.chiang@gmail.com>
Sun, 20 Mar 2022 15:34:56 +0000 (11:34 -0400)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 21 Mar 2022 15:07:18 +0000 (16:07 +0100)
commit0a094fb65ca1392231ef8176f89f936e39f3296e
tree12149a218d15e0861f764b990e3b7b6252e9d202
parentbd5d136777ef30f36807c7e690413846ed38fce1
Rewrite hl-line-mode

The fashion of dual global and minor modes, each managing a replica of
state, has long been outmoded by globalized minor modes (nee
easy-mmode-define-global-mode) around the turn of the century.

* lisp/calendar/todo-mode.el (todo-toggle-item-highlighting,
todo-hl-line-range, todo-modes-set-2): Adapt to new
hl-line-highlight-hook.
* lisp/hl-line.el (hl-line-overlay): Rename hl-line--overlay.
(global-hl-line-overlay, global-hl-line-overlays,
global-hl-line-sticky-flag, hl-line-overlay-buffer,
hl-line-range-function): Obsolesce.
(hl-line--overlay): Erstwhile hl-line-overlay.
(hl-line, hl-line-face): Consolidate.
(hl-line-sticky-flag): Say less (Gen Z Hospital).
(hl-line-overlay-priority): Make this a custom.
(hl-line-highlight-hook): Prefer hook over specialized
hl-line-range-function.
(hl-line-mode): Say less (Gen Z Hospital).
(hl-line-make-overlay): Remove
(hl-line-highlight, hl-line-unhighlight): Rewrite.
(hl-line-maybe-unhighlight): Remove.
(hl-line-turn-on): Necessary for globalized minor mode.
(global-hl-line-mode, global-hl-line-highlight,
global-hl-line-highlight-all, global-hl-line-unhighlight,
global-hl-line-maybe-unhighlight, global-hl-line-unhighlight-all):
Prefer globalized minor mode.
(hl-line-move, hl-line-unload-function): Remove.
* test/lisp/calendar/todo-mode-tests.el (todo-test-item-highlighting,
todo-test-done-items-separator06-bol,
todo-test-done-items-separator06-eol,
todo-test-done-items-separator07): Adapt to consolidated face.
lisp/calendar/todo-mode.el
lisp/hl-line.el
test/lisp/calendar/todo-mode-tests.el
test/lisp/hl-line-tests.el [new file with mode: 0644]