Rename to 'inhibit-automatic-native-compilation'
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 3 Oct 2022 17:49:53 +0000 (19:49 +0200)
committerSean Whitton <spwhitton@spwhitton.name>
Mon, 24 Feb 2025 07:38:41 +0000 (15:38 +0800)
The following upstream patch has been backported:

  Rename to inhibit-automatic-native-compilation

  * src/comp.c (maybe_defer_native_compilation):
  (syms_of_comp):
  * lisp/startup.el (inhibit-native-compilation):
  (normal-top-level):
  * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load):
  * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Rename
  inhibit-native-compilation to inhibit-automatic-native-compilation.

Origin: upstream, commit f97993ee667f9be7589825f3a4fbc095d6944ec6
Forwarded: not-needed

lisp/emacs-lisp/comp.el
lisp/startup.el
src/comp.c

index d1182b35cfe1697ce97f1229da2dc32e42aa0b27..8f7a49e471c503e38974748ce5ef2d47f522bf5f 100644 (file)
@@ -3359,7 +3359,7 @@ Prepare every function for final compilation and drive the C back-end."
   "Return the absolute filename for a trampoline for SUBR-NAME."
   ;; If we've disabled nativecomp, don't write the trampolines to
   ;; the eln cache (but create them).
-  (and (not inhibit-native-compilation)
+  (and (not inhibit-automatic-native-compilation)
        (cl-loop
        with dirs = (if (stringp native-comp-enable-subr-trampolines)
                        (list (expand-file-name native-comp-enable-subr-trampolines
index e5d6bd87cacba9d3680388b0c3d21a1855bd6028..c6242b39e4fc41aad676ddc4713582b3f25e98ba 100644 (file)
@@ -528,7 +528,7 @@ DIRS are relative."
      (t emacs-d-dir))))
 
 (defvar native-comp-eln-load-path)
-(defvar inhibit-native-compilation)
+(defvar inhibit-automatic-native-compilation)
 (defvar native-comp-enable-subr-trampolines)
 
 (defvar startup--original-eln-load-path nil
@@ -590,7 +590,8 @@ It is the default value of the variable `top-level'."
     (setq android-fonts-enumerated t))
 
   ;; Allow disabling automatic .elc->.eln processing.
-  (setq inhibit-native-compilation (getenv "EMACS_INHIBIT_NATIVE_COMPILATION"))
+  (setq inhibit-automatic-native-compilation
+        (getenv "EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION"))
 
   (if command-line-processed
       (message internal--top-level-message)
@@ -610,7 +611,7 @@ It is the default value of the variable `top-level'."
         ;; in this session.  This is necessary if libgccjit is not
         ;; available on MS-Windows, but Emacs was built with
         ;; native-compilation support.
-        (setq inhibit-native-compilation t
+        (setq inhibit-automatic-native-compilation t
               native-comp-enable-subr-trampolines nil))
 
       ;; Form `native-comp-eln-load-path'.
index ffbc2be106bf72b2e37a958cce5b0abd1131426f..f63a6f3a6d9ee084630f509869f96e2d11388598 100644 (file)
@@ -5201,7 +5201,7 @@ maybe_defer_native_compilation (Lisp_Object function_name,
     return;
 
   if (!native_comp_jit_compilation
-      || !NILP (Vinhibit_native_compilation)
+      || !NILP (Vinhibit_automatic_native_compilation)
       || noninteractive
       || !NILP (Vpurify_flag)
       || !CLOSUREP (definition)
@@ -5689,12 +5689,14 @@ void
 syms_of_comp (void)
 {
 #ifdef HAVE_NATIVE_COMP
-  DEFVAR_LISP ("inhibit-native-compilation", Vinhibit_native_compilation,
+  DEFVAR_LISP ("inhibit-automatic-native-compilation",
+              Vinhibit_automatic_native_compilation,
               doc: /* If non-nil, inhibit automatic native compilation of loaded .elc files.
 
 After compilation, each function definition is updated to the native
 compiled one.  */);
-  Vinhibit_native_compilation = Qnil;
+  Vinhibit_automatic_native_compilation = Qnil;
+
   DEFVAR_BOOL ("native-comp-jit-compilation", native_comp_jit_compilation,
     doc: /* If non-nil, compile loaded .elc files asynchronously.