From: Juri Linkov Date: Sat, 11 Mar 2006 22:34:46 +0000 (+0000) Subject: (battery-linux-proc-acpi): Check `capacity' for non-nil X-Git-Tag: emacs-pretest-22.0.90~3665 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c93b1b4b30b107b1b54c663e5de092a1641e93b9;p=emacs.git (battery-linux-proc-acpi): Check `capacity' for non-nil before comparing with `low' and `warn'. --- 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"))