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.
This commit is contained in:
Sean Whitton 2026-05-24 11:46:47 +01:00
parent 7cee526a8c
commit a7414f1859

View file

@ -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.")