all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 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: Thu, 15 Sep 2022 09:39:43 +0200	[thread overview]
Message-ID: <877d25krwg.fsf@gmail.com> (raw)
In-Reply-To: <871qsd4xnj.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 14 Sep 2022 20:29:52 +0200")

>>>>> On Wed, 14 Sep 2022 20:29:52 +0200, Lars Ingebrigtsen <larsi@gnus.org> said:

    Lars> Robert Pluim <rpluim@gmail.com> writes:
    >> I have a change that will cause the lookups to happen in the specified
    >> map first, but I still need to audit the 50 or so uses of a command
    >> with an advertised binding in a docstring in the Emacs sources before
    >> I can declare it safe.

I donʼt think any of the advertised bindings caused a problem, but
Iʼll double check.

    Lars> This was more than half a year ago -- did you get any further here?  (I
    Lars> agree that the explicitly specified keymap should take precedence over
    Lars> :advertised-key-binding.)

The patch has shrunk in the meantime, somebody simplified the code ;-)

Robert

diff --git a/lisp/help.el b/lisp/help.el
index 15ab3192ad..263775e64e 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1204,7 +1204,8 @@ substitute-command-keys
                 (delete-char 2)
                 (let* ((fun (intern (buffer-substring (point) (1- end-point))))
                        (key (with-current-buffer orig-buf
-                              (where-is-internal fun keymap t))))
+                                 (where-is-internal fun (ensure-list keymap) t)))
+
                   (if (not key)
                       ;; Function is not on any key.
                       (let ((op (point)))





  reply	other threads:[~2022-09-15  7:39 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 [this message]
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
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877d25krwg.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 \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.