]> git.eshelyaron.com Git - emacs.git/commitdiff
(help-fns-function-description-header): Fix last change (bug#70209)
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 5 Apr 2024 22:29:16 +0000 (18:29 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sat, 6 Apr 2024 06:44:34 +0000 (08:44 +0200)
* lisp/help-fns.el (help-fns-function-description-header): Don't make
a button for the type if it's not a type.

(cherry picked from commit 0286a11f3139dfd4bb9d3989ae860b8c128e12d0)

lisp/help-fns.el

index 843293f80ce4be479e845ce94349c5a338e8f12e..7abed6c66bffb14af581ba1632dce1a253507b00 100644 (file)
@@ -1139,15 +1139,15 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
                      (setq elts (cdr-safe elts)))
                    (concat beg (if is-full "keymap" "sparse keymap"))))
                 (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)))))))))
+                 (concat beg (format "%s"
+                                     (if (and (consp def) (symbolp (car def)))
+                                         (car def)
+                                       (let ((type (or (oclosure-type def)
+                                                       (cl-type-of def))))
+                                         (make-text-button
+                                          (symbol-name type) nil
+                                          'type 'help-type
+                                          'help-args (list type))))))))))
     (with-current-buffer standard-output
       (insert description))