]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/emacs-lisp/cl-preloaded.el (cl--define-derived-type): Fix corner case
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 14 May 2025 02:38:15 +0000 (22:38 -0400)
committerEshel Yaron <me@eshelyaron.com>
Wed, 14 May 2025 12:35:20 +0000 (14:35 +0200)
(cherry picked from commit 81cbff70f29c5138859b75b9a7369e0019c457b6)

lisp/emacs-lisp/cl-preloaded.el

index d6962ba1dee8e0d0639cab5f9244274208810164..263a9b852256730ffc84ca97c07f8d70a3b7c622 100644 (file)
@@ -508,8 +508,11 @@ PARENTS is a list of types NAME is a subtype of, or nil."
           (error "Type %S already in another class: %S" name (type-of class))))
     ;; Setup a type descriptor for NAME.
     (setf (cl--find-class name)
-          (cl--derived-type-class-make name (function-documentation expander)
-                                       parents))
+          (cl--derived-type-class-make
+           name
+           (and (fboundp 'function-documentation) ;Bootstrap corner case.
+                (function-documentation expander))
+           parents))
     (define-symbol-prop name 'cl-deftype-handler expander)
     (when predicate
       (define-symbol-prop name 'cl-deftype-satisfies predicate)