unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 49265@debbugs.gnu.org
Subject: bug#49265: [External] : bug#49265: 28.0.50; repeat mode feature request
Date: Thu, 18 Nov 2021 11:16:24 +0100	[thread overview]
Message-ID: <87czmxn4zr.fsf@gmail.com> (raw)
In-Reply-To: <86lf1miumm.fsf@mail.linkov.net> (Juri Linkov's message of "Wed,  17 Nov 2021 19:01:37 +0200")

>>>>> On Wed, 17 Nov 2021 19:01:37 +0200, Juri Linkov <juri@linkov.net> said:

    Juri> Hi Robert,
    Juri> What do you think about using `map-keymap' in `describe-repeat-maps'
    Juri> to fix the following problem?  Could it help to print all keys
    Juri> bound to the same command?

    >> I noticed one shortcoming: describe-repeat-maps prints
    >> only one keybinding for every command.  But sometimes
    >> the same command is bound to more than 1 key in the same keymap.

You donʼt need `map-keymap' for that:

diff --git a/lisp/repeat.el b/lisp/repeat.el
index 45201ad1aa..5458ff30e5 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -533,10 +533,11 @@ describe-repeat-maps
           (dolist (command (sort (cdr keymap) 'string-lessp))
             (let* ((info (help-fns--analyze-function command))
                    (map (list (symbol-value (car keymap))))
-                   (desc (key-description
-                          (or (where-is-internal command map t)
-                              (where-is-internal (nth 3 info) map t)))))
-              (princ (format-message " `%s' (bound to '%s')\n" command desc))))
+                   (desc (mapconcat (lambda (key)
+                                      (format "'%s'" (key-description key)))
+                                    (or (where-is-internal command map)
+                                        (where-is-internal (nth 3 info) map)) ", ")))
+              (princ (format-message " `%s' (bound to %s)\n" command desc))))
           (princ "\n"))))))
 
 (provide 'repeat)





  reply	other threads:[~2021-11-18 10:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87czs53aei.fsf.ref@aol.com>
2021-06-28 22:13 ` bug#49265: 28.0.50; repeat mode feature request Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-29  8:38   ` Juri Linkov
2021-06-29 15:25     ` bug#49265: [External] : " Drew Adams
2021-06-29 20:37       ` Juri Linkov
2021-06-29 21:28         ` Drew Adams
2021-06-30  9:50           ` Robert Pluim
2021-06-30 15:10             ` Drew Adams
2021-06-29 20:36     ` Juri Linkov
2021-06-29 21:33       ` bug#49265: [External] : " Drew Adams
2021-06-30  9:59         ` Robert Pluim
2021-06-30 15:11           ` Drew Adams
2021-06-30 19:56             ` Juri Linkov
2021-06-30 21:15               ` Drew Adams
2021-07-04 20:31                 ` Juri Linkov
2021-07-04 21:09                   ` Drew Adams
2021-07-05  9:48                     ` Robert Pluim
2021-07-05 14:53                       ` Drew Adams
2021-07-05 21:04                       ` Juri Linkov
2021-07-06  1:31                         ` Drew Adams
2021-07-06 17:54                           ` Juri Linkov
2021-07-06 18:25                             ` Drew Adams
2021-06-30 19:55           ` Juri Linkov
2021-11-15 17:51             ` Juri Linkov
2021-11-15 18:21               ` Juri Linkov
2021-11-17 17:01                 ` Juri Linkov
2021-11-18 10:16                   ` Robert Pluim [this message]
2021-11-18 17:44                     ` Juri Linkov

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=87czmxn4zr.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=49265@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /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).