]> git.cworth.org Git - notmuch/commitdiff
emacs/tree: condition hl-line-mode on notmuch-hl-line
authorDavid Bremner <david@tethera.net>
Sat, 10 Aug 2024 17:36:23 +0000 (14:36 -0300)
committerDavid Bremner <david@tethera.net>
Thu, 13 Mar 2025 10:55:21 +0000 (07:55 -0300)
It isn't clear that this call to hl-line-mode will survive the coming
re-organization to stop relying on hooks, but incrementally this at
least makes the disabling behaviour consistent.

emacs/notmuch-tree.el
test/T312-emacs-hl-line.sh

index 2332f020c14a76ef461fc13d5202d12ab35a1686..24a9970ffc8ebee10a595d1de6910b60e085ae02 100644 (file)
@@ -1091,7 +1091,8 @@ Complete list of currently available key bindings:
 
 \\{notmuch-tree-mode-map}"
   (setq notmuch-buffer-refresh-function #'notmuch-tree-refresh-view)
-  (hl-line-mode 1)
+  (when notmuch-hl-line
+    (hl-line-mode 1))
   (setq buffer-read-only t)
   (setq truncate-lines t)
   (when notmuch-tree-outline-enabled (notmuch-tree-outline-mode 1)))
index 4697b67157d7b6791686d0803ec16ea11d2c89c1..dd27db0e25841af37de18f2e76e74b5b5c6dc1de 100755 (executable)
@@ -147,7 +147,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line nil))
                           nil))'
 
 test_begin_subtest "hl-line disabled, tree"
-test_subtest_known_broken
 test_emacs_expect_t '(let ((notmuch-hl-line nil))
                        (notmuch-tree "tag:inbox")
                        (notmuch-test-wait)
@@ -156,7 +155,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line nil))
                           nil))'
 
 test_begin_subtest "hl-line disabled, unthreaded"
-test_subtest_known_broken
 test_emacs_expect_t '(let ((notmuch-hl-line nil))
                        (notmuch-unthreaded "tag:inbox")
                        (notmuch-test-wait)