X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0f668a4db4a33f98f84613513af3efea521b4847..88312cfc5990060c2d5d54002774ef07e354dd12:/lisp/battery.el diff --git a/lisp/battery.el b/lisp/battery.el index 98ba7d1b63..780278fc09 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -1,4 +1,4 @@ -;;; battery.el --- display battery status information -*- coding: iso-8859-1 -*- +;;; battery.el --- display battery status information -*- coding: utf-8 -*- ;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc. @@ -116,7 +116,7 @@ string are substituted as defined by the current value of the variable (defcustom battery-mode-line-format (cond ((eq battery-status-function 'battery-linux-proc-acpi) - "[%b%p%%,%d°C]") + "[%b%p%%,%d°C]") (battery-status-function "[%b%p%%]")) "Control string formatting the string to display in the mode line. @@ -615,7 +615,7 @@ The following %-sequences are provided: (with-temp-buffer (ignore-errors (call-process "pmset" nil t nil "-g" "ps")) (goto-char (point-min)) - (when (re-search-forward "Currentl?y drawing from '\\(AC\\|Battery\\) Power'" nil t) + (when (re-search-forward "\\(?:Currentl?y\\|Now\\) drawing from '\\(AC\\|Battery\\) Power'" nil t) (setq power-source (match-string 1)) (when (re-search-forward "^ -InternalBattery-0[ \t]+" nil t) (when (looking-at "\\([0-9]\\{1,3\\}\\)%")