GNU bug report logs -
#64417
30.0.50; keymap-unset :REMOVE keyword not working
Previous Next
Reported by: German Pacenza <germanp82 <at> hotmail.com>
Date: Sun, 2 Jul 2023 11:53:01 UTC
Severity: normal
Found in version 30.0.50
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Thanks for providing a great example of why the `remove` arg of
> `keymap-unset` is a problematic feature :-)
>
> The technical reason for the above: while `diff-mode-map` has no parent,
> the keymap bound to ESC in `diff-mode-map` has `diff-mode-shared-map`
> as parent, and `M-SPC` is the same (for keymap purposes) as `ESC SPC`.
> Of curse, there's no binding of anything to `scroll-up-command` itself
> in `diff-mode-shared-map` itself: the binding is to be found in
> `diff-mode-shared-map`s parent, `special-mode-map`.
>
> So we can't *remove* the binding from `M-SPC` to `scroll-up-command`
> without modifying some other keymap.
>
> So, the code is doing The Right Thing :-(
>
>
> Stefan
>
I added that line to my init in October last year and it worked fine. I
git bisect and found the commit that broke it:
commit bb3e0ded9eba71596b34806b302d63977259c3dd
Author: Robert Pluim <rpluim <at> gmail.com>
Date: Fri Mar 17 09:50:38 2023 +0100
Don't add a key binding when REMOVE is non-nil
* src/keymap.c (store_in_keymap): Don't add a nil keybinding if we've
been asked to remove a non-existent binding. (Bug#62207)
What I do is setting M-SPC in global-map to 'execute-extended-command'
That gets shadowed by diff-mode-map to run 'scroll-up-command', so I use
keymap-unset with :REMOVE to remove it.
Currently keymap-unset removes the binding _without_ :REMOVE and doesn't
do anything _with_ :REMOVE.
--
German Pacenza
This bug report was last modified 1 year and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.