summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-04-09 18:33:01 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-04-09 18:33:01 -0400
commitdd6b9c9426c5d7dde66974c5790815c3520a755b (patch)
tree88b44a85afb5a3146fe3dea91332b46e9badc601 /lisp/emacs-lisp
parent73bd48de3cf45de02c0f1caf5bd5196f4d4b08f5 (diff)
downloademacs-dd6b9c9426c5d7dde66974c5790815c3520a755b.tar.gz
emacs-dd6b9c9426c5d7dde66974c5790815c3520a755b.tar.bz2
emacs-dd6b9c9426c5d7dde66974c5790815c3520a755b.zip
(cl--describe-class-slots): Avoid cryptic `t` type
* 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`.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/cl-extra.el12
-rw-r--r--lisp/emacs-lisp/cl-preloaded.el4
2 files changed, 9 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 4660d94ea90..19429ce80df 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -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))))
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index d23ad3972a9..83d9e6ee220 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -224,8 +224,8 @@
(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.
)