GNU bug report logs - #62207
29.0.60; Trying to remove non-existent key binding instead adds a binding

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Wed, 15 Mar 2023 16:08:02 UTC

Severity: normal

Tags: fixed

Found in version 29.0.60

Fixed in version 29.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 62207 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jonas Bernoulli <jonas <at> bernoul.li>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 62207 <at> debbugs.gnu.org
Subject: Re: bug#62207: 29.0.60;
 Trying to remove non-existent key binding instead adds a binding
Date: Wed, 15 Mar 2023 19:13:20 +0200
> From: Jonas Bernoulli <jonas <at> bernoul.li>
> Date: Wed, 15 Mar 2023 17:07:42 +0100
> 
> However if you try to remove a binding that does not actually exist,
> then the opposite happens, a "nil binding" is *added*:
> 
>   (let ((map (make-sparse-keymap)))
>     (keymap-unset map "i" t)
>     map)
>   => (keymap (105))

The same happens when you call define-key with REMOVE non-nil.
keymap-unset just calls define-key, and does little else.

Stefan, it sounds like the part of store_in_keymap after the label
keymap_end should do nothing if REMOVE is non-zero, am I right?




This bug report was last modified 2 years and 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.