bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18157: 24.4.50; battery-pmset fails to report critical battery state


From: Lars Ingebrigtsen
Subject: bug#18157: 24.4.50; battery-pmset fails to report critical battery state
Date: Sat, 20 Feb 2016 18:35:14 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Marcin Borkowski <address@hidden> writes:

> Does this patch help?
>
> diff -u --label /usr/local/share/emacs/25.1.50/lisp/battery.el.gz --label 
> \#\<buffer\ battery.el.gz\> /tmp/jka-com1889YvM /tmp/buffer-content-1889yDZ
> --- /usr/local/share/emacs/25.1.50/lisp/battery.el.gz
> +++ #<buffer battery.el.gz>
> @@ -628,12 +628,12 @@
>           (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 "")))

Looks logical to me.  I've applied it to emacs-25.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]