Subject: Re: bug#77725: 31.0.50; Add support for types accepted by `cl-typep' to cl-generic?

From: David Ponce <[email-masked]>
Date: Tue, 13 May 2025 18:04:07 +0200

Hi Stefan,

It seems that since your commit below:

commit	dfafe1830f06634ec779fd62f7081d4cc4f6d3e7
lisp/emacs-lisp/cl-macs.el (cl--define-derived-type): Fix partial bootstrap

None of the derived types mentioned in cl-macs.el are created anymore.
Even after "make bootstrap".

The patch below fixed the problem for me, so I'm wondering if, when you
wrote "unless," you actually meant "when" ;-)

Thanks!

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index d086afc49e4..d594b3cb233 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -3820,7 +3820,7 @@ cl-deftype
  ;; Thanks to `eval-and-compile', `cl--define-derived-type' is needed
  ;; both at compile-time and at runtime, so we need to double-check.
  (static-if (not (fboundp 'cl--define-derived-type)) nil
-  (unless (fboundp 'cl--define-derived-type)
+  (when (fboundp 'cl--define-derived-type)
      (cl-deftype natnum () (declare (parents integer)) '(satisfies natnump))
      (cl-deftype character () (declare (parents fixnum natnum))
                  '(and fixnum natnum))