From: Stefan Monnier Date: Fri, 5 Apr 2024 11:41:42 +0000 (-0400) Subject: * lisp/help-fns.el (help-fns-function-description-header): Fix bug#70209 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=030c221846299c3dff4b19d108840eeef5a1a4b8;p=emacs.git * lisp/help-fns.el (help-fns-function-description-header): Fix bug#70209 Replace the whimsical "" default by something actually useful. (cherry picked from commit 200a0e5e7d589256d9aad79ff0e9b74b579e7f5e) --- diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 12910b1961d..843293f80ce 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -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))