]> git.eshelyaron.com Git - emacs.git/commitdiff
* Fix `startup--honor-delayed-native-compilations' for (bug#53497)
authorAndrea Corallo <akrl@sdf.org>
Thu, 27 Jan 2022 10:47:41 +0000 (11:47 +0100)
committerAndrea Corallo <akrl@sdf.org>
Thu, 27 Jan 2022 10:55:35 +0000 (11:55 +0100)
* lisp/startup.el (startup--honor-delayed-native-compilations): Don't
forget to set `comp--loadable' when `comp--delayed-sources' is empty.

lisp/startup.el

index d90e7a7d26e3a09afa71a28611d7b70e3bfa3fab..05d829396d60ffb27fc1d2f651519e18db445acf 100644 (file)
@@ -525,12 +525,16 @@ DIRS are relative."
                   (files &optional recursively load selector))
 (defun startup--honor-delayed-native-compilations ()
   "Honor pending delayed deferred native compilations."
-  (when (and (native-comp-available-p)
-             comp--delayed-sources)
-    (require 'comp)
-    (setq comp--loadable t)
-    (native--compile-async comp--delayed-sources nil 'late)
-    (setq comp--delayed-sources nil)))
+  (if (and (native-comp-available-p)
+           comp--delayed-sources)
+      (progn
+        ;; Require comp before setting `comp--loadable' to break
+        ;; circularity.
+        (require 'comp)
+        (setq comp--loadable t)
+        (native--compile-async comp--delayed-sources nil 'late)
+        (setq comp--delayed-sources nil))
+    (setq comp--loadable t)))
 
 (defvar native-comp-eln-load-path)
 (defun normal-top-level ()