unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: German Pacenza <germanp82@hotmail.com>
Cc: 64417@debbugs.gnu.org
Subject: bug#64417: 30.0.50; keymap-unset :REMOVE keyword not working
Date: Sun, 02 Jul 2023 17:41:15 -0400	[thread overview]
Message-ID: <jwvv8f26lif.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <DM5PR2201MB1161C68C2F94D5C268E8CD06A728A@DM5PR2201MB1161.namprd22.prod.outlook.com> (German Pacenza's message of "Sun, 02 Jul 2023 13:54:38 -0300")

>     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






  reply	other threads:[~2023-07-02 21:41 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
2023-07-02 21:41     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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=jwvv8f26lif.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=64417@debbugs.gnu.org \
    --cc=germanp82@hotmail.com \
    --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).