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 #56 received at 79305 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Aaron Jensen" <aaronjensen <at> gmail.com>
Cc: Justin Burkett <justin <at> burkett.cc>, Jonas Bernoulli <jonas <at> bernoul.li>,
 79305 <at> debbugs.gnu.org, Sean Whitton <spwhitton <at> spwhitton.name>
Subject: Re: bug#79305: 31.0.50; MODE-set-explicitly change caused
 regressions in bind-map
Date: Thu, 04 Sep 2025 00:25:18 -0400
> Yes.  This is how bind-map works.

[ My questions are about how it *should* work rather than how it works.  ]

> It adds to `evil-normal-state-local-map`,
> which is a buffer local key map. It does this in response
> to evil-local-mode-hook, which, when evil-mode is enabled, will trigger in
> most buffers, and when it does, if the globalized minor mode being
> considered has not yet been initialized (as you mention below) then it

[ In your examples, while the globalized major mode has not been
  initialized, it *will not* be initialized later either, AFAICT.  ]

> cannot simply use the mode variable to determine if it's enabled.

Another way to look at the problem: when the minor mode is enabled or
disabled (which can happen at any time), which part of bind-map reacts
to update `evil-normal-state-local-map`?

> To be clear, I think this is a flaw in bind-map. I shared the repro before
> I figured out an alternative that does not have this limitation and is more
> in line with how evil seems to work. In other words, you may feel free to
> disregard this repro and proceed with closing this bug if you like.  I don't
> know if bind-map will be updated or not, but it does seem like it's not
> essential for it to use to the set-explicitly internal variable.

I think you're reaching the same conclusion I had reached, indeed: the
approach used currently in bind-map is flawed and works only in
some/most circumstances.


        Stefan





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.