diff options
| author | Lars Ingebrigtsen | 2022-06-19 16:21:14 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-06-19 16:21:14 +0200 |
| commit | a7ee25e90309fdf513d778ba0ae034aaff4cc559 (patch) | |
| tree | 10dcb41b49a03d396e39ff74233b3fd36fafbfad /lisp/repeat.el | |
| parent | b2d11d69dd49864874f8fe53669b4049e83bfce9 (diff) | |
| download | emacs-a7ee25e90309fdf513d778ba0ae034aaff4cc559.tar.gz emacs-a7ee25e90309fdf513d778ba0ae034aaff4cc559.zip | |
Make describe-repeat-maps fontify key bindings
* lisp/repeat.el (describe-repeat-maps): Fontify key bindings as
key bindings.
Diffstat (limited to 'lisp/repeat.el')
| -rw-r--r-- | lisp/repeat.el | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/repeat.el b/lisp/repeat.el index 94ea9f7ac1f..dff3931aebf 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el | |||
| @@ -557,21 +557,24 @@ Used in `repeat-mode'." | |||
| 557 | (push s (alist-get (get s 'repeat-map) keymaps))))) | 557 | (push s (alist-get (get s 'repeat-map) keymaps))))) |
| 558 | (with-help-window (help-buffer) | 558 | (with-help-window (help-buffer) |
| 559 | (with-current-buffer standard-output | 559 | (with-current-buffer standard-output |
| 560 | (princ "A list of keymaps used by commands with the symbol property `repeat-map'.\n\n") | 560 | (insert "A list of keymaps used by commands with the symbol property `repeat-map'.\n\n") |
| 561 | 561 | ||
| 562 | (dolist (keymap (sort keymaps (lambda (a b) (string-lessp (car a) (car b))))) | 562 | (dolist (keymap (sort keymaps (lambda (a b) |
| 563 | (princ (format-message "`%s' keymap is repeatable by these commands:\n" | 563 | (string-lessp (car a) (car b))))) |
| 564 | (car keymap))) | 564 | (insert (format-message |
| 565 | (dolist (command (sort (cdr keymap) 'string-lessp)) | 565 | "`%s' keymap is repeatable by these commands:\n" |
| 566 | (car keymap))) | ||
| 567 | (dolist (command (sort (cdr keymap) #'string-lessp)) | ||
| 566 | (let* ((info (help-fns--analyze-function command)) | 568 | (let* ((info (help-fns--analyze-function command)) |
| 567 | (map (list (symbol-value (car keymap)))) | 569 | (map (list (symbol-value (car keymap)))) |
| 568 | (desc (mapconcat (lambda (key) | 570 | (desc (mapconcat (lambda (key) |
| 569 | (format-message "`%s'" (key-description key))) | 571 | (propertize (key-description key) |
| 572 | 'face 'help-key-binding)) | ||
| 570 | (or (where-is-internal command map) | 573 | (or (where-is-internal command map) |
| 571 | (where-is-internal (nth 3 info) map)) | 574 | (where-is-internal (nth 3 info) map)) |
| 572 | ", "))) | 575 | ", "))) |
| 573 | (princ (format-message " `%s' (bound to %s)\n" command desc)))) | 576 | (insert (format-message " `%s' (bound to %s)\n" command desc)))) |
| 574 | (princ "\n"))))))) | 577 | (insert "\n"))))))) |
| 575 | 578 | ||
| 576 | (provide 'repeat) | 579 | (provide 'repeat) |
| 577 | 580 | ||