summaryrefslogtreecommitdiff
path: root/lisp/battery.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-04-20 16:48:50 +0800
committerChong Yidong <cyd@gnu.org>2012-04-20 16:48:50 +0800
commitc07a4c0b599e0debfb10acdf02ac6559b998a88a (patch)
treef87bca47c21f04b43cca2347a21ed89c57b67958 /lisp/battery.el
parent6cf2a23e297b8a57a70c2a1dab5aa28b73461b0b (diff)
parent50e5ebca7edcf5299b89ff74499991de01e22046 (diff)
downloademacs-c07a4c0b599e0debfb10acdf02ac6559b998a88a.tar.gz
Merge from emacs-24 branch
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 78898534a47..dcfe07121b3 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -78,7 +78,7 @@ introduced by a `%' character in a control string."
(cond ((eq battery-status-function 'battery-linux-proc-acpi)
"Power %L, battery %B at %r (%p%% load, remaining time %t)")
((eq battery-status-function 'battery-linux-sysfs)
- "Power %L, battery %B (%p%% load)")
+ "Power %L, battery %B (%p%% load, remaining time %t)")
((eq battery-status-function 'battery-pmset)
"%L power, battery %B (%p%% load, remaining time %t)")
(battery-status-function
@@ -509,7 +509,7 @@ The following %-sequences are provided:
"N/A"))
(cons ?d (or temperature "N/A"))
(cons ?B (or charging-state "N/A"))
- (cons ?p (cond ((> charge-full 0)
+ (cons ?p (cond ((and (> charge-full 0) (> charge-now 0))
(format "%.1f"
(/ (* 100 charge-now) charge-full)))
((> energy-full 0)