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>
Sun, 30 Jul 2023 19:09:42 +0000 (20:09 +0100)
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/progmodes/elisp-mode.el
lisp/startup.el
src/comp.c

index 52702cab5c92342b75d64aa25b29006d789db2c1..d2c6dbe0c058b687887af30b750de5851119754a 100644 (file)
@@ -3814,7 +3814,7 @@ Return the trampoline if found or nil otherwise."
   "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 4f735f2e5a86c62596906766b318fd0569cfbc16..4561f2d0d280fd2f2b6fa0b20582296bb11d6f3a 100644 (file)
@@ -222,8 +222,8 @@ All commands in `lisp-mode-shared-map' are inherited by this map."
 Load the compiled code when finished.
 
 Use `emacs-lisp-byte-compile-and-load' in combination with
-`inhibit-native-compilation' set to nil to achieve asynchronous
-native compilation."
+`inhibit-automatic-native-compilation' set to nil to achieve
+asynchronous native compilation."
   (interactive nil emacs-lisp-mode)
   (emacs-lisp--before-compile-buffer)
   (let ((byte+native-compile t)
index ac17b645f15abb4a6b29cfc2d0de0f601e2d118d..b89f9cd95dabe88fed74122c3f8256454051ca9b 100644 (file)
@@ -546,7 +546,7 @@ DIRS are relative."
   (setq comp--compilable t))
 
 (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
@@ -584,7 +584,8 @@ It sets `command-line-processed', processes the command-line,
 reads the initialization files, etc.
 It is the default value of the variable `top-level'."
   ;; 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)
@@ -604,7 +605,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 06ddb956bb5a764b3a8ee59b09f889efbac1c073..136b5e8fe5df4680e8f2850bdb8827b974109904 100644 (file)
@@ -5179,7 +5179,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)
       || !COMPILEDP (definition)
@@ -5682,12 +5682,13 @@ For internal use.  */);
     doc: /* Non-nil when comp.el can be native compiled.
 For internal use. */);
   /* Compiler control customizes.  */
-  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.