summaryrefslogtreecommitdiff
path: root/test/lisp/calendar/todo-mode-tests.el
diff options
context:
space:
mode:
authordickmao <dick.r.chiang@gmail.com>2022-03-20 11:34:56 -0400
committerLars Ingebrigtsen <larsi@gnus.org>2022-03-21 16:07:18 +0100
commit0a094fb65ca1392231ef8176f89f936e39f3296e (patch)
tree12149a218d15e0861f764b990e3b7b6252e9d202 /test/lisp/calendar/todo-mode-tests.el
parentbd5d136777ef30f36807c7e690413846ed38fce1 (diff)
downloademacs-0a094fb65ca1392231ef8176f89f936e39f3296e.tar.gz
emacs-0a094fb65ca1392231ef8176f89f936e39f3296e.tar.bz2
emacs-0a094fb65ca1392231ef8176f89f936e39f3296e.zip
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.
Diffstat (limited to 'test/lisp/calendar/todo-mode-tests.el')
-rw-r--r--test/lisp/calendar/todo-mode-tests.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/lisp/calendar/todo-mode-tests.el b/test/lisp/calendar/todo-mode-tests.el
index 0102b62c10f..8715a32b883 100644
--- a/test/lisp/calendar/todo-mode-tests.el
+++ b/test/lisp/calendar/todo-mode-tests.el
@@ -130,8 +130,8 @@ In particular, all lines of a multiline item should be highlighted."
(todo-toggle-item-highlighting)
(let ((end (1- (todo-item-end)))
(beg (todo-item-start)))
- (should (eq (get-char-property beg 'face) 'hl-line))
- (should (eq (get-char-property end 'face) 'hl-line))
+ (should (eq (get-char-property beg 'face) 'hl-line-face))
+ (should (eq (get-char-property end 'face) 'hl-line-face))
(should (> (count-lines beg end) 1))
(should (eq (next-single-char-property-change beg 'face) (1+ end))))
(todo-toggle-item-highlighting))) ; Turn off highlighting (for test rerun).
@@ -736,7 +736,7 @@ Subsequently moving to an item should show it highlighted."
(todo-test--done-items-separator)
(call-interactively #'todo-toggle-item-highlighting)
(ert-simulate-command '(todo-previous-item))
- (should (eq 'hl-line (get-char-property (point) 'face)))))
+ (should (eq 'hl-line-face (get-char-property (point) 'face)))))
(ert-deftest todo-test-done-items-separator06-eol () ; bug#32343
"Test enabling item highlighting at EOL of done items separator.
@@ -746,7 +746,7 @@ Subsequently moving to an item should show it highlighted."
(todo-toggle-item-highlighting)
(forward-line -1)
(ert-simulate-command '(todo-previous-item))
- (should (eq 'hl-line (get-char-property (point) 'face)))))
+ (should (eq 'hl-line-face (get-char-property (point) 'face)))))
(ert-deftest todo-test-done-items-separator07 () ; bug#32343
"Test item highlighting when crossing done items separator.
@@ -758,7 +758,7 @@ The highlighting should remain enabled."
(todo-next-item) ; Now on empty line above separator.
(forward-line) ; Now on separator.
(ert-simulate-command '(forward-line)) ; Now on first done item.
- (should (eq 'hl-line (get-char-property (point) 'face)))))
+ (should (eq 'hl-line-face (get-char-property (point) 'face)))))
(ert-deftest todo-test-current-file-in-edit-mode () ; bug#32437
"Test the value of todo-current-todo-file in todo-edit-mode."