From: Robert Pluim <rpluim@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Kangas <stefan@marxist.se>,
51384@debbugs.gnu.org, Andreas Schwab <schwab@linux-m68k.org>,
Juri Linkov <juri@linkov.net>
Subject: bug#51384: 28.0.60; substitute-command-keys finds global binding for undo instead of in specified keymap
Date: Tue, 20 Sep 2022 18:41:45 +0200 [thread overview]
Message-ID: <87v8pic81i.fsf@gmail.com> (raw)
In-Reply-To: <87fsgmavsm.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 20 Sep 2022 17:51:37 +0200")
>>>>> On Tue, 20 Sep 2022 17:51:37 +0200, Lars Ingebrigtsen <larsi@gnus.org> said:
Lars> 1 unexpected results:
Lars> FAILED help-tests-substitute-command-keys/keymap-change
Thatʼs doing
(test "\\<minibuffer-local-must-match-map>\\[abort-recursive-edit]"
"C-]")
and abort-recursive-edit is in the global-map, and not
minibuffer-local-must-match-map. Oops. This fixes it. If that looks ok
Iʼll push later tonight.
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)))
next prev parent reply other threads:[~2022-09-20 16:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 9:57 bug#51384: 28.0.60; substitute-command-keys finds global binding for undo instead of in specified keymap Robert Pluim
2021-10-25 10:16 ` Andreas Schwab
2021-10-25 10:39 ` Robert Pluim
2021-11-15 17:25 ` Juri Linkov
2021-11-15 17:48 ` Robert Pluim
2022-09-14 18:29 ` Lars Ingebrigtsen
2022-09-15 7:39 ` Robert Pluim
2022-09-15 8:55 ` Robert Pluim
2022-09-15 9:00 ` Andreas Schwab
2022-09-15 9:04 ` Robert Pluim
2022-09-15 11:54 ` Drew Adams
2022-09-16 9:29 ` Lars Ingebrigtsen
2022-09-16 9:58 ` Robert Pluim
2022-09-16 9:59 ` Lars Ingebrigtsen
2022-09-20 15:47 ` Robert Pluim
2022-09-20 15:51 ` Lars Ingebrigtsen
2022-09-20 16:41 ` Robert Pluim [this message]
2022-09-20 18:03 ` Stefan Kangas
2022-09-21 7:17 ` Robert Pluim
2022-09-21 8:55 ` 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=87v8pic81i.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=51384@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=larsi@gnus.org \
--cc=schwab@linux-m68k.org \
--cc=stefan@marxist.se \
/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).