aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov <[email protected]>2006-03-11 22:34:46 +0000
committerJuri Linkov <[email protected]>2006-03-11 22:34:46 +0000
commitc93b1b4b30b107b1b54c663e5de092a1641e93b9 (patch)
tree3be462710e85e8bc9cf75566157dd3616528ab26
parentba44fca9cd7716cb93ec4fc914f917dd3fad1442 (diff)
(battery-linux-proc-acpi): Check `capacity' for non-nil
before comparing with `low' and `warn'.
-rw-r--r--lisp/battery.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/battery.el b/lisp/battery.el
index 65b8baff66..34f74aa993 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -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"))