diff options
| author | Nicolas Richard | 2020-03-21 10:57:28 +0100 |
|---|---|---|
| committer | Nicolas Richard | 2020-03-21 10:57:28 +0100 |
| commit | 06cdc95cba8a3cd7048f373767267400c7837132 (patch) | |
| tree | b275237642261420170136f6bfc4c6090640dd72 | |
| parent | 0a22747c3f17da0e64cbb6d82aab3a14e716f0fd (diff) | |
| download | emacs-fix/bug-39491.tar.gz emacs-fix/bug-39491.zip | |
* 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: | |||
| 656 | (cons ?B (if state | 656 | (cons ?B (if state |
| 657 | (cdr (assq state battery-upower-states)) | 657 | (cdr (assq state battery-upower-states)) |
| 658 | "unknown")) | 658 | "unknown")) |
| 659 | (cons ?b (cond ((= level 3) "-") | 659 | (cons ?b (cond ((not level) "") |
| 660 | ((= level 3) "-") | ||
| 660 | ((= level 4) "!") | 661 | ((= level 4) "!") |
| 661 | (online-p "+") | 662 | (online-p "+") |
| 662 | (t ""))) | 663 | (t ""))) |