]> git.eshelyaron.com Git - emacs.git/commitdiff
Add minibuffer-action to 'cl-describe-type'. Bind it too.
authorEshel Yaron <me@eshelyaron.com>
Sun, 11 Aug 2024 07:17:41 +0000 (09:17 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Aug 2024 07:19:09 +0000 (09:19 +0200)
lisp/emacs-lisp/cl-extra.el
lisp/help.el

index 19429ce80dfb4df6332ccd1142f19f1c251c636c..1b95b272c25c6bcd3d7392bc4986b33e37665490 100644 (file)
@@ -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
index 932e93291cde0dbe4dd05d6e389d40f58bc0ff95..03c2f5000459733a16cd9dbe17c48a3cf2528f47 100644 (file)
@@ -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