Variable: native-comp-async-on-battery-power
native-comp-async-on-battery-power is a customizable variable defined
in comp-run.el.gz.
Value
t
Documentation
Whether to start asynchronous native compilation while on battery power.
Customize this to nil to disable starting async compilations when AC power is not connected. Async compilations that are already running when AC power is disconnected are not affected. Compilations skipped because AC power was disconnected are not started again if AC power is subsequently reconnected; in most cases, those compilations will not be tried again until after you next restart Emacs.
Customizing this to nil has no effect unless battery-status-function
can correctly detect the absence of connected AC power on your platform.
This variable was added, or its default value changed, in Emacs 31.1.
Probably introduced at or before Emacs version 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp-run.el.gz
;; TODO If we could start compilations that were skipped if and when AC
;; power is subsequently reconnected, we could consider changing
;; the default to nil. --spwhitton
(defcustom native-comp-async-on-battery-power t
"Whether to start asynchronous native compilation while on battery power.
Customize this to nil to disable starting async compilations when AC
power is not connected. Async compilations that are already running
when AC power is disconnected are not affected. Compilations skipped
because AC power was disconnected are not started again if AC power is
subsequently reconnected; in most cases, those compilations will not be
tried again until after you next restart Emacs.
Customizing this to nil has no effect unless `battery-status-function'
can correctly detect the absence of connected AC power on your platform."
:type 'boolean
:version "31.1")