]> git.eshelyaron.com Git - emacs.git/commitdiff
Report critical battery errors
authorMarcin Borkowski <mbork@mbork.pl>
Sat, 20 Feb 2016 07:33:48 +0000 (18:33 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 20 Feb 2016 07:33:48 +0000 (18:33 +1100)
* lisp/battery.el (battery-pmset): Report critical battery
errors (bug#18157).

lisp/battery.el

index d0293697befa6fe055ee69ecb22b1f83db2cad3f..b5e312f6c3e2913c4a7cf9dd606da4351e15c7fa 100644 (file)
@@ -628,12 +628,12 @@ The following %-sequences are provided:
            (cond ((looking-at "; charging")
                   (setq battery-status "charging"
                         battery-status-symbol "+"))
-                 ((< (string-to-number load-percentage) battery-load-low)
-                  (setq battery-status "low"
-                        battery-status-symbol "-"))
                  ((< (string-to-number load-percentage) battery-load-critical)
                   (setq battery-status "critical"
                         battery-status-symbol "!"))
+                 ((< (string-to-number load-percentage) battery-load-low)
+                  (setq battery-status "low"
+                        battery-status-symbol "-"))
                  (t
                   (setq battery-status "high"
                         battery-status-symbol "")))