]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/cl-generic.el (cl--generic-compiler): Clarify the test
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 25 Jan 2024 19:24:20 +0000 (14:24 -0500)
committerEshel Yaron <me@eshelyaron.com>
Fri, 26 Jan 2024 11:22:40 +0000 (12:22 +0100)
Use `compiled-function-p`.

(cherry picked from commit 4e260bfc47e5b507df1db218f49729fbae91900c)

lisp/emacs-lisp/cl-generic.el

index 511a0035feb13230deb2dc2bc0169112bf697fee..a4505a9d82ec582dd0aac9aa8fa1f52386161439 100644 (file)
@@ -672,7 +672,7 @@ The set of acceptable TYPEs (also called \"specializers\") is defined
   ;; compiled.  Otherwise the byte-compiler and all the code on
   ;; which it depends needs to be usable before cl-generic is loaded,
   ;; which imposes a significant burden on the bootstrap.
-  (if (consp (lambda (x) (+ x 1)))
+  (if (not (compiled-function-p (lambda (x) (+ x 1))))
       (lambda (exp) (eval exp t))
     ;; But do byte-compile the dispatchers once bootstrap is passed:
     ;; the performance difference is substantial (like a 5x speedup on