From 2f28496d038eebe3715cbcfd1cb3981fd5a69739 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 3 Oct 2022 19:49:53 +0200 Subject: [PATCH] Rename to 'inhibit-automatic-native-compilation' 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 | 2 +- lisp/progmodes/elisp-mode.el | 4 ++-- lisp/startup.el | 7 ++++--- src/comp.c | 7 ++++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 37abd886b49..04b27c6e66a 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3795,7 +3795,7 @@ Return the trampoline if found or nil otherwise." form nil ;; 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 for dir in (if native-compile-target-directory (list (expand-file-name comp-native-version-dir diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 2af174ff752..9c5c4230212 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -218,8 +218,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) (load (native-compile buffer-file-name))) diff --git a/lisp/startup.el b/lisp/startup.el index 9e09a051c53..6a879c83094 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -524,7 +524,7 @@ DIRS are relative." (t emacs-d-dir)))) (defvar native-comp-eln-load-path) -(defvar inhibit-native-compilation) +(defvar inhibit-automatic-native-compilation) (defvar comp-enable-subr-trampolines) (defun normal-top-level () @@ -533,7 +533,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) @@ -553,7 +554,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 comp-enable-subr-trampolines nil)) ;; Form `native-comp-eln-load-path'. diff --git a/src/comp.c b/src/comp.c index 5600339581a..9a99033dae0 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4826,7 +4826,7 @@ maybe_defer_native_compilation (Lisp_Object function_name, return; if (!native_comp_deferred_compilation - || !NILP (Vinhibit_native_compilation) + || !NILP (Vinhibit_automatic_native_compilation) || noninteractive || !NILP (Vpurify_flag) || !COMPILEDP (definition) @@ -5337,12 +5337,13 @@ syms_of_comp (void) { #ifdef HAVE_NATIVE_COMP /* 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-deferred-compilation", native_comp_deferred_compilation, -- 2.30.2