From 855940df6bde5ed41ed55336a3ac6f6ae0c6267e Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 22 Mar 2020 15:08:58 +0000 Subject: [PATCH] * 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 f5961c7d2b6..b563f27da8f 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); + } } -- 2.39.5