emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 12f261c470: Fix hl-line-mode/global-hl-line-mode logic again


From: Lars Ingebrigtsen
Subject: master 12f261c470: Fix hl-line-mode/global-hl-line-mode logic again
Date: Thu, 13 Oct 2022 04:09:06 -0400 (EDT)

branch: master
commit 12f261c4708d58362c9e080a686b0e41821c6db8
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix hl-line-mode/global-hl-line-mode logic again
    
    * lisp/hl-line.el (hl-line-mode): Make explicit calls to
    (hl-line-mode 1) work again when global-hl-line-mode is on
    (bug#58478).
---
 lisp/hl-line.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 693c94eea8..87bea1017f 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -156,7 +156,8 @@ line about point in the selected window only."
   :group 'hl-line
   ;; If the global mode is switched on, then `M-x hl-line-mode' should
   ;; switch the mode off in this buffer.
-  (when global-hl-line-mode
+  (when (and global-hl-line-mode
+             (eq arg 'toggle))
     (setq hl-line-mode nil)
     (setq-local global-hl-line-mode nil)
     (global-hl-line-unhighlight))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]