]> git.eshelyaron.com Git - emacs.git/commitdiff
(cl--describe-class-slots): Avoid cryptic `t` type
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 9 Apr 2024 22:33:01 +0000 (18:33 -0400)
committerEshel Yaron <me@eshelyaron.com>
Wed, 10 Apr 2024 20:30:34 +0000 (22:30 +0200)
* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slots): Use the empty
string for the trivial `t` type.

* lisp/emacs-lisp/cl-preloaded.el (cl-structure-class):
Fix non-existing `bool` => `boolean`.

(cherry picked from commit dd6b9c9426c5d7dde66974c5790815c3520a755b)

lisp/emacs-lisp/cl-extra.el
lisp/emacs-lisp/cl-preloaded.el

index 4660d94ea90f9123228ecaafe6a3bce4ec55b48e..19429ce80dfb4df6332ccd1142f19f1c251c636c 100644 (file)
@@ -917,11 +917,13 @@ Outputs to the current buffer."
                (lambda (slot)
                  (list (cl-prin1-to-string (cl--slot-descriptor-name slot))
                        (let ((type (cl--slot-descriptor-type slot)))
-                         (if (and type (symbolp type) (cl--find-class type))
-                             (make-text-button (symbol-name type) nil
-                                              'type 'help-type
-                                              'help-args (list type))
-                           (cl-prin1-to-string type)))
+                         (cond
+                          ((eq type t) "")
+                          ((and type (symbolp type) (cl--find-class type))
+                           (make-text-button (symbol-name type) nil
+                                            'type 'help-type
+                                            'help-args (list type)))
+                          (t (cl-prin1-to-string type))))
                        (cl-prin1-to-string (cl--slot-descriptor-initform slot))
                        (let ((doc (alist-get :documentation
                                              (cl--slot-descriptor-props slot))))
index d23ad3972a9ac1a575fa95496a1b236201194855..83d9e6ee2200e3847d463efda75f87d49831ffa6 100644 (file)
   (index-table nil :type hash-table)
   (tag nil :type symbol) ;Placed in cl-tag-slot.  Holds the struct-class object.
   (type nil :type (memq (vector list)))
-  (named nil :type bool)
-  (print nil :type bool)
+  (named nil :type boolean)
+  (print nil :type boolean)
   (children-sym nil :type symbol) ;This sym's value holds the tags of children.
   )