From 43e90e7caa9cbb10097ed9526052fe82cd30b9f0 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 10 Aug 2024 14:36:23 -0300 Subject: [PATCH] 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. --- emacs/notmuch-tree.el | 3 ++- test/T312-emacs-hl-line.sh | 2 -- 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) -- 2.45.2