summaryrefslogtreecommitdiff
path: root/lisp/repeat.el
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2021-11-29 15:13:31 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-11-29 15:13:31 +0100
commit49422d2e6986d3ec161e194c73c38f2a7c4b3c64 (patch)
tree8c06e889c12cb34d3ee8c400d8807f15b21063f1 /lisp/repeat.el
parentd8dd705e9d82df96d67d88e1bf90373b6b4fbaa9 (diff)
downloademacs-49422d2e6986d3ec161e194c73c38f2a7c4b3c64.tar.gz
Do not buttonize key bindings outside of *Help* buffers
* etc/NEWS: Mention the new variable. * lisp/apropos.el (apropos-describe-plist): Bind the new variable (bug#52053). * lisp/button.el (button-describe): Bind the new variable. * lisp/help-fns.el (describe-function, describe-variable) (describe-face, describe-symbol, describe-syntax) (describe-categories, describe-keymap, describe-mode) (describe-widget): Bind the new variable. * lisp/help-macro.el (make-help-screen): Bind the new variable. * lisp/help.el (help-buffer-under-preparation): New variable that is bound to t by commands that create a *Help* buffer. (substitute-command-keys): Use the new variable: help-link-key-to-documentation is supposed to have an effect only "in *Help* buffers". Fixes bug#52053. (view-lossage, describe-bindings, describe-key): Bind the new variable. * lisp/repeat.el (describe-repeat-maps): Bind the new variable. * lisp/international/mule-cmds.el (describe-input-method) (describe-language-environment): Bind the new variable. * lisp/international/mule-diag.el (describe-character-set) (describe-coding-system, describe-font, describe-fontset) ((list-fontsets): Bind the new variable.
Diffstat (limited to 'lisp/repeat.el')
-rw-r--r--lisp/repeat.el51
1 files changed, 26 insertions, 25 deletions
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 32ffb1884f3..7bbb398873c 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -515,31 +515,32 @@ See `describe-repeat-maps' for a list of all repeatable commands."
Used in `repeat-mode'."
(interactive)
(require 'help-fns)
- (help-setup-xref (list #'describe-repeat-maps)
- (called-interactively-p 'interactive))
- (let ((keymaps nil))
- (all-completions
- "" obarray (lambda (s)
- (and (commandp s)
- (get s 'repeat-map)
- (push s (alist-get (get s 'repeat-map) keymaps)))))
- (with-help-window (help-buffer)
- (with-current-buffer standard-output
- (princ "A list of keymaps used by commands with the symbol property `repeat-map'.\n\n")
-
- (dolist (keymap (sort keymaps (lambda (a b) (string-lessp (car a) (car b)))))
- (princ (format-message "`%s' keymap is repeatable by these commands:\n"
- (car keymap)))
- (dolist (command (sort (cdr keymap) 'string-lessp))
- (let* ((info (help-fns--analyze-function command))
- (map (list (symbol-value (car keymap))))
- (desc (mapconcat (lambda (key)
- (format-message "`%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"))))))
+ (let ((help-buffer-under-preparation t))
+ (help-setup-xref (list #'describe-repeat-maps)
+ (called-interactively-p 'interactive))
+ (let ((keymaps nil))
+ (all-completions
+ "" obarray (lambda (s)
+ (and (commandp s)
+ (get s 'repeat-map)
+ (push s (alist-get (get s 'repeat-map) keymaps)))))
+ (with-help-window (help-buffer)
+ (with-current-buffer standard-output
+ (princ "A list of keymaps used by commands with the symbol property `repeat-map'.\n\n")
+
+ (dolist (keymap (sort keymaps (lambda (a b) (string-lessp (car a) (car b)))))
+ (princ (format-message "`%s' keymap is repeatable by these commands:\n"
+ (car keymap)))
+ (dolist (command (sort (cdr keymap) 'string-lessp))
+ (let* ((info (help-fns--analyze-function command))
+ (map (list (symbol-value (car keymap))))
+ (desc (mapconcat (lambda (key)
+ (format-message "`%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)