[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64417: 30.0.50; keymap-unset :REMOVE keyword not working
From: |
Stefan Monnier |
Subject: |
bug#64417: 30.0.50; keymap-unset :REMOVE keyword not working |
Date: |
Sun, 02 Jul 2023 17:41:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> 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.
`remove` is for the case where you want to unhide the keybinding of
a *parent* map (that's an unusual use-case). Here OTOH you want to
unhide the keybinding of a lower-precedence map, so you shouldn't use
`remove`.
> Currently keymap-unset removes the binding _without_ :REMOVE and doesn't
> do anything _with_ :REMOVE.
If it hurts, don't do that :-)
Stefan