aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2024-08-10 14:36:23 -0300
committerDavid Bremner <david@tethera.net>2025-03-13 07:55:21 -0300
commit43e90e7caa9cbb10097ed9526052fe82cd30b9f0 (patch)
tree57a355d2285259b8dfad7ef4736d1107ce444fed
parent5cb06b1893091cb069da990556e822c21a684acf (diff)
emacs/tree: condition hl-line-mode on notmuch-hl-line
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.
-rw-r--r--emacs/notmuch-tree.el3
-rwxr-xr-xtest/T312-emacs-hl-line.sh2
2 files changed, 2 insertions, 3 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 2332f020..24a9970f 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -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)))
diff --git a/test/T312-emacs-hl-line.sh b/test/T312-emacs-hl-line.sh
index 4697b671..dd27db0e 100755
--- a/test/T312-emacs-hl-line.sh
+++ b/test/T312-emacs-hl-line.sh
@@ -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)