summaryrefslogtreecommitdiff
path: root/lisp/battery.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2006-03-11 22:34:46 +0000
committerJuri Linkov <juri@jurta.org>2006-03-11 22:34:46 +0000
commitc93b1b4b30b107b1b54c663e5de092a1641e93b9 (patch)
tree3be462710e85e8bc9cf75566157dd3616528ab26 /lisp/battery.el
parentba44fca9cd7716cb93ec4fc914f917dd3fad1442 (diff)
downloademacs-c93b1b4b30b107b1b54c663e5de092a1641e93b9.tar.gz
(battery-linux-proc-acpi): Check `capacity' for non-nil
before comparing with `low' and `warn'.
Diffstat (limited to 'lisp/battery.el')
-rw-r--r--lisp/battery.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/battery.el b/lisp/battery.el
index 65b8baff66c..34f74aa9932 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"))