From: Andrea Corallo Date: Wed, 18 Mar 2020 21:20:52 +0000 (+0000) Subject: Command late load when deferring compilation X-Git-Tag: emacs-28.0.90~2727^2~760 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7565a4a1170bf36352ffd7283c18ac1843ae8123;p=emacs.git Command late load when deferring compilation --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index f1e99c5ee16..44de2745c6c 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -41,7 +41,9 @@ :group 'lisp) (defcustom comp-deferred-compilation nil - "If t compile asyncronously all lexically bound .elc files being loaded." + "If t compile asyncronously all lexically bound .elc files being loaded. +Once compilation happened each function definition is updated to +the native compiled one." :type 'boolean :group 'comp) diff --git a/src/comp.c b/src/comp.c index 3f2b45c85fd..d645b59590f 100644 --- a/src/comp.c +++ b/src/comp.c @@ -3381,7 +3381,8 @@ 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); + CALLN (Ffuncall, intern_c_string ("native-compile-async"), src, Qnil, + Qlate); } @@ -3639,6 +3640,7 @@ syms_of_comp (void) /* Others. */ DEFSYM (Qfixnum, "fixnum"); DEFSYM (Qscratch, "scratch"); + DEFSYM (Qlate, "late"); /* To be signaled by the compiler. */ DEFSYM (Qnative_compiler_error, "native-compiler-error");