]> git.eshelyaron.com Git - emacs.git/commitdiff
cl-preloaded.el: Improve docstrings of "kinds"
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 24 Mar 2024 02:48:17 +0000 (22:48 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sun, 24 Mar 2024 14:22:31 +0000 (15:22 +0100)
* lisp/emacs-lisp/cl-preloaded.el (cl--class): Improve the docstring.
(built-in-class): Add a docstring.

(cherry picked from commit a496378c94176930583e63ef5c95477f092a872b)

lisp/emacs-lisp/cl-preloaded.el
lisp/emacs-lisp/cl-print.el
lisp/emacs-lisp/nadvice.el

index f7757eae9c0ea6ded95175592cc1307ce5f11323..8428ec4beb74d869cbf62ba170820834a1fb5b35 100644 (file)
 (cl-defstruct (cl--class
                (:constructor nil)
                (:copier nil))
-  "Type of descriptors for any kind of structure-like data."
+  "Abstract supertype of all type descriptors."
   ;; Intended to be shared between defstruct and defclass.
   (name nil :type symbol)               ;The type name.
   (docstring nil :type string)
                (:constructor nil)
                (:constructor built-in-class--make (name docstring parents))
                (:copier nil))
+  "Type descriptors for built-in types.
+The `slots' (and hence `index-table') are currently unused."
   )
 
 (defmacro cl--define-built-in-type (name parents &optional docstring &rest slots)
index c35353ec3d0431aab03d2382fef24ab45e1ba9f1..5e5eee1da9e1612a5b436d369c045ccfe70ecc5e 100644 (file)
@@ -444,7 +444,7 @@ primitives such as `prin1'.")
 
 (defun cl-print--preprocess (object)
   (let ((print-number-table (make-hash-table :test 'eq :rehash-size 2.0)))
-    (if (fboundp 'print--preprocess)
+    (if (fboundp 'print--preprocess)    ;Emacs≄26
         ;; Use the predefined C version if available.
         (print--preprocess object)           ;Fill print-number-table!
       (let ((cl-print--number-index 0))
index 7524ab18e58959dd9e97ebba16f952a509babc8f..5326c520601b243f54ec01437a49864619ebc032 100644 (file)
@@ -189,7 +189,7 @@ DOC is a string where \"FUNCTION\" and \"OLDFUN\" are expected.")
         if
       (cl-assert (eq 'interactive (car if)))
       (let ((form (cadr if)))
-        (if (macroexp-const-p form)
+        (if (macroexp-const-p form)     ;Common case: a string.
             if
           ;; The interactive is expected to be run in the static context
           ;; that the function captured.