From 93c96c7ed3f15b672fcb22a3471e30ab89216cd0 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Mon, 9 Jun 2025 23:54:54 -0400 Subject: [PATCH] When minimal-emacs-setup-native-compilation is nil, leave native-comp variables to their default values --- early-init.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/early-init.el b/early-init.el index e19a684..dda1a6c 100644 --- a/early-init.el +++ b/early-init.el @@ -74,11 +74,14 @@ When set to non-nil, Emacs will automatically call `package-initialize' and `package-refresh-contents' to set up and update the package system.") (defvar minimal-emacs-setup-native-compilation t - "If non-nil, enable and configure native compilation. -When enabled, this variable sets the following: + "Controls whether native compilation settings are enabled during setup. +When non-nil, the following variables are set to non-nil to enable +native compilation features: - `native-comp-deferred-compilation' - `native-comp-jit-compilation' -- `package-native-compile'") +- `package-native-compile' +If nil, these variables are left at their default values and are not +modified during setup.") (defvar minimal-emacs-user-directory user-emacs-directory "The default value of the `user-emacs-directory' variable.") @@ -155,10 +158,11 @@ pre-early-init.el, and post-early-init.el.") (if (and (featurep 'native-compile) (fboundp 'native-comp-available-p) (native-comp-available-p)) - ;; Activate `native-compile' - (setq native-comp-deferred-compilation minimal-emacs-setup-native-compilation - native-comp-jit-compilation minimal-emacs-setup-native-compilation - package-native-compile minimal-emacs-setup-native-compilation) + (when minimal-emacs-setup-native-compilation + ;; Activate `native-compile' + (setq native-comp-deferred-compilation t + native-comp-jit-compilation t + package-native-compile t)) ;; Deactivate the `native-compile' feature if it is not available (setq features (delq 'native-compile features)))