]> git.eshelyaron.com Git - emacs.git/commitdiff
* comp.c (maybe_defer_native_compilation): Fix
authorAndrea Corallo <akrl@sdf.org>
Sun, 22 Mar 2020 15:08:58 +0000 (15:08 +0000)
committerAndrea Corallo <akrl@sdf.org>
Sun, 22 Mar 2020 16:11:45 +0000 (16:11 +0000)
Prevent recursive compilation while deferring compilation.

src/comp.c

index f5961c7d2b6c785218b1c0bd701044dba4fea95d..b563f27da8ff923edbdd712215a838d49c090e37 100644 (file)
@@ -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);
+    }
 }
 
 \f