1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-25 10:47:00 +00:00

(battery-linux-proc-acpi): Check `capacity' for non-nil

before comparing with `low' and `warn'.
This commit is contained in:
Juri Linkov 2006-03-11 22:34:46 +00:00
parent ba44fca9cd
commit c93b1b4b30

View File

@ -391,8 +391,8 @@ The following %-sequences are provided:
rate-type)) "N/A"))
(cons ?B (or charging-state "N/A"))
(cons ?b (or (and (string= charging-state "charging") "+")
(and (< capacity low) "!")
(and (< capacity warn) "-")
(and capacity (< capacity low) "!")
(and capacity (< capacity warn) "-")
""))
(cons ?h (or (and hours (number-to-string hours)) "N/A"))
(cons ?m (or (and minutes (number-to-string minutes)) "N/A"))