From dd6b9c9426c5d7dde66974c5790815c3520a755b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 9 Apr 2024 18:33:01 -0400 Subject: [PATCH] (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`. --- lisp/emacs-lisp/cl-extra.el | 12 +++++++----- lisp/emacs-lisp/cl-preloaded.el | 4 ++-- 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. )