GNU bug report logs - #51580
hl-line-mode doesn't override global-hl-line-mode in current buffer

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Wed, 3 Nov 2021 06:48:01 UTC

Severity: normal

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: 51580 <at> debbugs.gnu.org
Subject: bug#51580: hl-line-mode doesn't override global-hl-line-mode in current buffer
Date: Tue, 2 Nov 2021 23:47:14 -0700
It seems like there is currently no way to use `global-hl-line-mode'
while disabling it for individual buffers.

Steps to reproduce:

0. emacs -Q
1. M-x global-hl-line-mode
2. M-x hl-line-mode

Now, `global-hl-line-mode' is still in effect, and lines are still
highlighted.  I expect that running `hl-line-mode' turns off line
highlighting.

There is a comment in hl-line.el saying:

    ;; You could make variable `global-hl-line-mode' buffer-local and set
    ;; it to nil to avoid highlighting specific buffers, when the global
    ;; mode is used.

However, if I say M-x global-hl-line-mode and then

    M-: (setq-default global-hl-line-mode nil)

the highlighting overlay is left on the current line.




This bug report was last modified 2 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.