GNU bug report logs -
#77022
[PATCH] Allow specify in which major modes global-hl-line-mode must be enabled.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77022 in the body.
You can then email your comments to 77022 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77022
; Package
emacs
.
(Sat, 15 Mar 2025 01:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Elijah Gabe Pérez <eg642616 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 15 Mar 2025 01:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello, this patch add a user option for specify in which major modes
should global-hl-line-mode be switched on.
Originally i wanted to replace global-hl-line define-minor-mode
definition with define-globalized-minor-mode, however i found that this
was already done and was reverted in
*a34afbf2aea2fdaf691f4bf250a18991b21301d7* commit, so I decided to bring
this feature, since i find this better than using add-hook.
[Message part 2 (text/html, inline)]
[Message part 3 (text/plain, inline)]
--
- E.G via GNU Emacs and Org.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77022
; Package
emacs
.
(Sat, 15 Mar 2025 01:27:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
El vie., 14 de marzo de 2025 7:22 p. m., Elijah Gabe Pérez <
eg642616 <at> gmail.com> escribió:
> Hello, this patch add a user option for specify in which major modes
> should global-hl-line-mode be switched on.
>
> Originally i wanted to replace global-hl-line define-minor-mode definition
> with define-globalized-minor-mode, however i found that this was already
> done and was reverted in *a34afbf2aea2fdaf691f4bf250a18991b21301d7*
> commit, so I decided to bring this feature, since i find this better than
> using add-hook.
>
>
> --
> - E.G via GNU Emacs and Org.
>
[Message part 2 (text/html, inline)]
[0001-Allow-specify-in-which-major-modes-global-hl-line-mo.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77022
; Package
emacs
.
(Sat, 15 Mar 2025 09:21:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 77022 <at> debbugs.gnu.org (full text, mbox):
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> Date: Fri, 14 Mar 2025 19:26:36 -0600
>
> El vie., 14 de marzo de 2025 7:22 p. m., Elijah Gabe Pérez <eg642616 <at> gmail.com> escribió:
>
> Hello, this patch add a user option for specify in which major modes should global-hl-line-mode be
> switched on.
>
> Originally i wanted to replace global-hl-line define-minor-mode definition with
> define-globalized-minor-mode, however i found that this was already done and was reverted in
> a34afbf2aea2fdaf691f4bf250a18991b21301d7 commit, so I decided to bring this feature, since i find
> this better than using add-hook.
Thanks.
> +*** New variable 'global-hl-line-modes'.
> +This specifies in which major modes should the global-hl-line-mode be
^^^^^^^^^^^^^^^^^^^
The mode should be quoted 'like this'.
> +(defcustom global-hl-line-modes t
> + "Which major modes `hl-line-mode' is switched on in.
> +This variable can be either t (all major modes), nil (no major modes),
> +or a list of modes and (not modes) to switch use this minor mode or
> +not. For instance
> +
> + (c-mode (not message-mode mail-mode) text-mode)
> +
> +means \"use this mode in all modes derived from `c-mode', don't use in
> +modes derived from `message-mode' or `mail-mode', but do use in other
> +modes derived from `text-mode'\". An element with value t means \"use\"
> +and nil means \"don't use\". There's an implicit nil at the end of the
> +list."
> + :type
> + '(choice (const :tag "Enable in all major modes" t)
> + (const :tag "Don't enable in any major mode" nil)
Why is it useful to have a value of nil here? Why would anyone
activate this mode when the variable has the value nil?
> @@ -224,7 +254,8 @@ global-hl-line-mode
> on `post-command-hook'."
> :global t
> :group 'hl-line
> - (if global-hl-line-mode
> + (if (and global-hl-line-mode
> + (easy-mmode--globalized-predicate-p global-hl-line-modes))
> (progn
> ;; In case `kill-all-local-variables' is called.
> (add-hook 'change-major-mode-hook #'global-hl-line-unhighlight)
Maybe I'm missing something, but don't you need to consult this new
variable in global-hl-line-highlight-all?
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 15 Mar 2025 12:01:05 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77022
; Package
emacs
.
(Sat, 15 Mar 2025 18:36:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 77022 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> +(defcustom global-hl-line-modes t
>> + "Which major modes `hl-line-mode' is switched on in.
>> +This variable can be either t (all major modes), nil (no major modes),
>> +or a list of modes and (not modes) to switch use this minor mode or
>> +not. For instance
>> +
>> + (c-mode (not message-mode mail-mode) text-mode)
>> +
>> +means \"use this mode in all modes derived from `c-mode', don't use in
>> +modes derived from `message-mode' or `mail-mode', but do use in other
>> +modes derived from `text-mode'\". An element with value t means \"use\"
>> +and nil means \"don't use\". There's an implicit nil at the end of the
>> +list."
>> + :type
>> + '(choice (const :tag "Enable in all major modes" t)
>> + (const :tag "Don't enable in any major mode" nil)
> Why is it useful to have a value of nil here? Why would anyone
> activate this mode when the variable has the value nil?
Well, this is extracted by expanding define-globalized-minor-mode macro,
I've deleted them /(i'm wondering why that macro adds them since i find them unnecessaries)/
>> @@ -224,7 +254,8 @@ global-hl-line-mode
>> on `post-command-hook'."
>> :global t
>> :group 'hl-line
>> - (if global-hl-line-mode
>> + (if (and global-hl-line-mode
>> + (easy-mmode--globalized-predicate-p global-hl-line-modes))
>> (progn
>> ;; In case `kill-all-local-variables' is called.
>> (add-hook 'change-major-mode-hook #'global-hl-line-unhighlight)
> Maybe I'm missing something, but don't you need to consult this new
> variable in global-hl-line-highlight-all?
I've moved it to =global-hl-line-highlight=, which should work better.
[Message part 2 (text/html, inline)]
[0001-Allow-specify-in-which-major-modes-global-hl-line-mo.patch (text/x-patch, attachment)]
[Message part 4 (text/plain, inline)]
--
- E.G via GNU Emacs and Org.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 20 Mar 2025 13:07:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Elijah Gabe Pérez <eg642616 <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 20 Mar 2025 13:07:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 77022-done <at> debbugs.gnu.org (full text, mbox):
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> Cc: 77022 <at> debbugs.gnu.org
> Date: Sat, 15 Mar 2025 12:35:37 -0600
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> +(defcustom global-hl-line-modes t + "Which major modes `hl-line-mode' is switched on in. +This
> variable can be either t (all major modes), nil (no major modes), +or a list of modes and (not modes) to
> switch use this minor mode or +not. For instance + + (c-mode (not message-mode mail-mode)
> text-mode) + +means \"use this mode in all modes derived from `c-mode', don't use in +modes derived
> from `message-mode' or `mail-mode', but do use in other +modes derived from `text-mode'\". An
> element with value t means \"use\" +and nil means \"don't use\". There's an implicit nil at the end of the
> +list." + :type + '(choice (const :tag "Enable in all major modes" t) + (const :tag "Don't enable in any
> major mode" nil)
>
> Why is it useful to have a value of nil here? Why would anyone activate this mode when the variable
> has the value nil?
>
> Well, this is extracted by expanding define-globalized-minor-mode macro, I've deleted them (i'm wondering
> why that macro adds them since i find them unnecessaries)
>
> @@ -224,7 +254,8 @@ global-hl-line-mode on `post-command-hook'." :global t :group 'hl-line - (if
> global-hl-line-mode + (if (and global-hl-line-mode + (easy-mmode–globalized-predicate-p
> global-hl-line-modes)) (progn ;; In case `kill-all-local-variables' is called. (add-hook
> 'change-major-mode-hook #'global-hl-line-unhighlight)
>
> Maybe I'm missing something, but don't you need to consult this new variable in
> global-hl-line-highlight-all?
>
> I've moved it to global-hl-line-highlight, which should work better.
Thanks, installed on master, and closing the bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Apr 2025 11:24:21 GMT)
Full text and
rfc822 format available.
This bug report was last modified 61 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.