summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2026-05-24 11:46:47 +0100
committerSean Whitton <spwhitton@spwhitton.name>2026-05-24 11:46:47 +0100
commita7414f18598bab861f3fef307efd0b8e15cb6ebe (patch)
treefee991079685e50493e0a0f237b146f63c77a33f /lisp
parent7cee526a8cc44dd7166108ec2718a4ca0d1ad1f1 (diff)
native--compile-skip-on-battery-p: Try to fix ?b, ?B conditions
* lisp/emacs-lisp/comp-run.el (native--compile-skip-on-battery-p): Don't skip charging because the battery is charging, and don't look for "discharging", at least for now (bug#80922). Thanks to David Koppelman <koppel@ece.lsu.edu> for the report.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/comp-run.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el
index f329d627392..64e20327906 100644
--- a/lisp/emacs-lisp/comp-run.el
+++ b/lisp/emacs-lisp/comp-run.el
@@ -203,9 +203,10 @@ LOAD and SELECTOR work as described in `native--compile-async'."
;; because power users often configure their batteries
;; to stop charging at less than 100% as a way to
;; extend the lifetime of their battery hardware.
- (string= (cdr (assq ?b res)) "+")
- (member (cdr (assq ?B res)) '("charging" "pending-charge"))
- (not (string= (cdr (assq ?B res)) "discharging")))))))
+ ;; Further discussion in bug#80922.
+ (and (not (equal (cdr (assq ?b res)) "+"))
+ (not (member (cdr (assq ?B res))
+ '("charging" "pending-charge")))))))))
(defvar comp-files-queue ()
"List of Emacs Lisp files to be compiled.")