[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix/bug-39491 06cdc95: * lisp/battery.el (battery-upower): Produce an em
From: |
Nicolas Richard |
Subject: |
fix/bug-39491 06cdc95: * lisp/battery.el (battery-upower): Produce an empty string if level is nil |
Date: |
Sat, 21 Mar 2020 06:04:57 -0400 (EDT) |
branch: fix/bug-39491
commit 06cdc95cba8a3cd7048f373767267400c7837132
Author: Nicolas Richard <address@hidden>
Commit: Nicolas Richard <address@hidden>
* lisp/battery.el (battery-upower): Produce an empty string if level is nil
---
lisp/battery.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/battery.el b/lisp/battery.el
index 7027b25..d441f15 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -656,7 +656,8 @@ The following %-sequences are provided:
(cons ?B (if state
(cdr (assq state battery-upower-states))
"unknown"))
- (cons ?b (cond ((= level 3) "-")
+ (cons ?b (cond ((not level) "")
+ ((= level 3) "-")
((= level 4) "!")
(online-p "+")
(t "")))