Subject: bug#62207: 29.0.60; Trying to remove non-existent key binding instead adds a binding

From: Robert Pluim <[email-masked]>
Date: Fri, 17 Mar 2023 10:55:23 +0100

>>>>> On Fri, 17 Mar 2023 09:54:05 +0100, Robert Pluim <[email-masked]> said:
    Robert> Sorry to be difficult, but why? I think the semantics are clear,
    Robert> although Iʼd prefer it if the first line of the docstring for
    Robert> `keymap-unset' said

    Robert>     Unset key sequence KEY in KEYMAP.

    Robert> to reduce confusion with the REMOVE argument.

`keymap-unset' is also not documented in the lisp reference
manual. How about this?

@findex keymap-unset
@defun keymap-unset keymap key &optional remove
This function is the inverse of @code{keymap-set}, it unsets the
binding for @var{key} in @var{keymap}, which is the same as setting
the binding to @code{nil}.  In order to instead remove the binding
completely, specify @var{remove} as non-nil.  This only makes a
difference if @var{keymap} has a parent keymap.  When unsetting a key
in a child map, it will still shadow the same key in the parent
keymap.  Removing the binding will allow the key in the parent keymap
to be used.

Robert
--