]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/help-fns.el (help-fns-function-description-header): Fix bug#70209
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 5 Apr 2024 11:41:42 +0000 (07:41 -0400)
committerEshel Yaron <me@eshelyaron.com>
Fri, 5 Apr 2024 12:12:51 +0000 (14:12 +0200)
Replace the whimsical "" default by something actually useful.

(cherry picked from commit 200a0e5e7d589256d9aad79ff0e9b74b579e7f5e)

lisp/help-fns.el

index 12910b1961d276cfc3de2dea3b2274e4be6f243a..843293f80ce4be479e845ce94349c5a338e8f12e 100644 (file)
@@ -1129,13 +1129,6 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
                      ;; need to check macros before functions.
                      (macrop function))
                  (concat beg "Lisp macro"))
-                ((atom def)
-                 (let ((type (or (oclosure-type def) (cl-type-of def))))
-                   (concat beg (format "%s"
-                                       (make-text-button
-                                        (symbol-name type) nil
-                                        'type 'help-type
-                                        'help-args (list type))))))
                 ((keymapp def)
                  (let ((is-full nil)
                        (elts (cdr-safe def)))
@@ -1145,7 +1138,16 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
                                elts nil))
                      (setq elts (cdr-safe elts)))
                    (concat beg (if is-full "keymap" "sparse keymap"))))
-                (t ""))))
+                (t
+                 (let ((type
+                        (if (and (consp def) (symbolp (car def)))
+                            (car def)
+                          (or (oclosure-type def) (cl-type-of def)))))
+                   (concat beg (format "%s"
+                                       (make-text-button
+                                        (symbol-name type) nil
+                                        'type 'help-type
+                                        'help-args (list type)))))))))
     (with-current-buffer standard-output
       (insert description))