[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49265: [External] : bug#49265: 28.0.50; repeat mode feature request
From: |
Robert Pluim |
Subject: |
bug#49265: [External] : bug#49265: 28.0.50; repeat mode feature request |
Date: |
Thu, 18 Nov 2021 11:16:24 +0100 |
>>>>> 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)