From fe46f55898b3ffc0cacac99764c2d5e10afd44fa Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sun, 11 Aug 2024 09:17:41 +0200 Subject: [PATCH] Add minibuffer-action to 'cl-describe-type'. Bind it too. --- lisp/emacs-lisp/cl-extra.el | 3 +++ lisp/help.el | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 19429ce80df..1b95b272c25 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -741,6 +741,7 @@ Call `cl--find-class' to get TYPE's propname `cl--class'" (if (<= (length str) 0) (user-error "Abort!") (list (intern str))))) + (when (stringp type) (setq type (intern type))) (help-setup-xref (list #'cl-describe-type type) (called-interactively-p 'interactive)) (save-excursion @@ -756,6 +757,8 @@ Call `cl--find-class' to get TYPE's propname `cl--class'" ;; Return the text we displayed. (buffer-string))))) +(put 'cl-describe-type 'minibuffer-action "describe") + (defun cl--class-children (class) (let ((children '())) (mapatoms diff --git a/lisp/help.el b/lisp/help.el index 932e93291cd..03c2f500045 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -54,6 +54,8 @@ buffer.") "Return `help-char' in a format suitable for the `keymap-set' KEY argument." (key-description (char-to-string help-char))) +(declare-function cl-describe-type "cl-extra") + (defvar-keymap help-map :doc "Keymap for characters following the Help key." "." #'display-local-help @@ -104,7 +106,8 @@ buffer.") "r" #'info-emacs-manual "R" #'info-display-manual "s" #'describe-syntax - "t" #'help-with-tutorial + "t" #'cl-describe-type + "T" #'help-with-tutorial "v" #'describe-variable "w" #'where-is "x" #'describe-command -- 2.39.2