GNU bug report logs - #79305
31.0.50; MODE-set-explicitly change caused regressions in bind-map

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Sun, 24 Aug 2025 22:19:01 UTC

Severity: normal

Found in version 31.0.50

Full log


Message #20 received at 79305 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: "Aaron Jensen" <aaronjensen <at> gmail.com>
Cc: Jonas Bernoulli <jonas <at> bernoul.li>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 79305 <at> debbugs.gnu.org
Subject: Re: bug#79305: 31.0.50; MODE-set-explicitly change caused
 regressions in bind-map
Date: Sun, 31 Aug 2025 16:23:12 +0100
Hello,

On Fri 29 Aug 2025 at 04:23pm GMT, Aaron Jensen wrote:

> On Fri, Aug 29, 2025 at 7:43 AM, Stefan Monnier <monnier <at> iro.umontreal.ca>
> wrote:
>
>  bind-map shouldn't use an internal variable like that.
>
>  +1, tho maybe bind-map has a good reason to do that. Does anyone know
>  something about that?
>
> It was in a commit with this message:
>
> Fix evil-local-mode-hook logic
> Can't be sure that the override modes are enabled before this hook is
> run so we check if the global mode is enabled and if the local mode is
> set explicitly in a prior hook (presumably a major mode hook).
>
> https://github.com/justbur/emacs-bind-map/commit/89747f7240e5f51084fd94aad502d67f426e03b4

Thanks for the link.  Unfortunately it seems like it would take a lot of
evil-mode knowledge to really know what's going on there.

Let me ask about the original purpose of the -set-explicitly machinery.
The comments say that the idea is that if the major mode hook has
(global-foo-mode -1), then our hook in after-change-major-mode-hook
won't undo that.

Major mode hooks are generally for the user.  So the idea is that this
is primarily a way for the user to disable the global minor mode in
particular major modes.  Right?

It looks to me that what emacs-bind-map is trying to use -set-explicitly
for is not that, but something about hook ordering.  So it's using it
for some other purpose, so it is probably using the wrong mechanism.

I think therefore in the absence of more information on the evil-mode
stuff, we should go ahead with restoring the variable but marking it as
obsolete.

-- 
Sean Whitton




This bug report was last modified 4 days ago.

Previous Next


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