emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d0aac84b2a 2/2: * Fix `startup--honor-delayed-native-compilations


From: Andrea Corallo
Subject: master d0aac84b2a 2/2: * Fix `startup--honor-delayed-native-compilations' for (bug#53497)
Date: Thu, 27 Jan 2022 05:56:18 -0500 (EST)

branch: master
commit d0aac84b2a8d82042475aeeeba465d0d5fd6ad3d
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * Fix `startup--honor-delayed-native-compilations' for (bug#53497)
    
    * lisp/startup.el (startup--honor-delayed-native-compilations): Don't
    forget to set `comp--loadable' when `comp--delayed-sources' is empty.
---
 lisp/startup.el | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index d90e7a7d26..05d829396d 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]