GNU bug report logs - #51384
28.0.60; substitute-command-keys finds global binding for undo instead of in specified keymap

Previous Next

Package: emacs;

Reported by: Robert Pluim <rpluim <at> gmail.com>

Date: Mon, 25 Oct 2021 09:58:01 UTC

Severity: normal

Tags: fixed

Found in version 28.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 #58 received at 51384 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51384 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51384: 28.0.60; substitute-command-keys finds global binding
 for undo instead of in specified keymap
Date: Tue, 20 Sep 2022 14:03:53 -0400
Robert Pluim <rpluim <at> gmail.com> writes:

> diff --git a/lisp/help.el b/lisp/help.el
> index 0ec5b9c85b..b4b9120da3 100644
> --- a/lisp/help.el
> +++ b/lisp/help.el
> @@ -1208,6 +1208,12 @@ substitute-command-keys
>                                                   (and keymap
>                                                        (list keymap))
>                                                   t))))
> +                  ;; If we're looking in a particular keymap which has
> +                  ;; no binding, then we need to redo the lookup, with
> +                  ;; the global map as well this time.
> +                  (when (and (not key) keymap)
> +                    (setq key (with-current-buffer orig-buf
> +                                (where-is-internal fun keymap t))))
>                    (if (not key)
>                        ;; Function is not on any key.
>                        (let ((op (point)))

This looks eerily similar to the code I removed here:

    commit ac0027f6a5480bd4739fdf71413a19012f400483
    Author: Stefan Kangas <stefan <at> marxist.se>
    Date:   Mon Jul 11 17:21:23 2022 +0200

        Remove dead branch from substitute-command-keys

        * lisp/help.el (substitute-command-keys): Remove dead branch;
        where-is-internal will follow any remaps for us.  Note also that the
        test case for remapping still pass.

Do we have a test case that reverting that commit would fix?

(I can't see Lars' message yet, so the delays with the gnu.org mail
systems seem to be ongoing...)




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

Previous Next


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