From: German Pacenza <germanp82@hotmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 64417@debbugs.gnu.org
Subject: bug#64417: 30.0.50; keymap-unset :REMOVE keyword not working
Date: Sun, 02 Jul 2023 13:54:38 -0300 [thread overview]
Message-ID: <DM5PR2201MB1161C68C2F94D5C268E8CD06A728A@DM5PR2201MB1161.namprd22.prod.outlook.com> (raw)
In-Reply-To: <jwv7cri8g39.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 02 Jul 2023 12:02:25 -0400")
Stefan Monnier <monnier@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@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
next prev parent reply other threads:[~2023-07-02 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-02 11:46 bug#64417: 30.0.50; keymap-unset :REMOVE keyword not working German Pacenza
2023-07-02 12:14 ` Eli Zaretskii
2023-07-02 16:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-02 16:54 ` German Pacenza [this message]
2023-07-02 21:41 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-02 22:30 ` German Pacenza
2023-09-10 7:34 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM5PR2201MB1161C68C2F94D5C268E8CD06A728A@DM5PR2201MB1161.namprd22.prod.outlook.com \
--to=germanp82@hotmail.com \
--cc=64417@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).