emacs-diffs
[Top][All Lists]
Advanced

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

feature/native-comp 855940d 5/6: * comp.c (maybe_defer_native_compilatio


From: Andrea Corallo
Subject: feature/native-comp 855940d 5/6: * comp.c (maybe_defer_native_compilation): Fix
Date: Sun, 22 Mar 2020 12:42:41 -0400 (EDT)

branch: feature/native-comp
commit 855940df6bde5ed41ed55336a3ac6f6ae0c6267e
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>

    * comp.c (maybe_defer_native_compilation): Fix
    
    Prevent recursive compilation while deferring compilation.
---
 src/comp.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/comp.c b/src/comp.c
index f5961c7..b563f27 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -3402,8 +3402,13 @@ maybe_defer_native_compilation (Lisp_Object 
function_name,
     concat2 (CALL1I (file-name-sans-extension, Vload_file_name),
             build_pure_c_string (".el"));
   if (!NILP (Ffile_exists_p (src)))
-    CALLN (Ffuncall, intern_c_string ("native-compile-async"), src, Qnil,
-          Qlate);
+    {
+      comp_deferred_compilation = false;
+      Frequire (intern_c_string ("comp"), Qnil, Qnil);
+      comp_deferred_compilation = true;
+      CALLN (Ffuncall, intern_c_string ("native-compile-async"), src, Qnil,
+            Qlate);
+    }
 }
 
 



reply via email to

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