diff options
author | Nicolas Richard <youngfrog@members.fsf.org> | 2020-03-21 10:57:28 +0100 |
---|---|---|
committer | Nicolas Richard <youngfrog@members.fsf.org> | 2020-03-21 10:57:28 +0100 |
commit | 06cdc95cba8a3cd7048f373767267400c7837132 (patch) | |
tree | b275237642261420170136f6bfc4c6090640dd72 | |
parent | 0a22747c3f17da0e64cbb6d82aab3a14e716f0fd (diff) | |
download | emacs-fix/bug-39491.tar.gz |
* lisp/battery.el (battery-upower): Produce an empty string if level is nilfix/bug-39491
-rw-r--r-- | lisp/battery.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/battery.el b/lisp/battery.el index 7027b254480..d441f1597ce 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 ""))) |