[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 25dca60: Fix compatibility with macOS 10.12 pmset (
From: |
Alan Third |
Subject: |
[Emacs-diffs] master 25dca60: Fix compatibility with macOS 10.12 pmset (bug#24537) |
Date: |
Fri, 30 Sep 2016 21:41:13 +0000 (UTC) |
branch: master
commit 25dca60d5e3b2447352b7c51496baefb4ccd579d
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>
Fix compatibility with macOS 10.12 pmset (bug#24537)
* lisp/battery.el (battery-pmset): Recognise and ignore battery id if
present in output.
---
lisp/battery.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/battery.el b/lisp/battery.el
index 1b58489..e6e79b0 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -625,7 +625,7 @@ The following %-sequences are provided:
(goto-char (point-min))
(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 (re-search-forward "^ -InternalBattery-0\\([ \t]+(id=[0-9]+)\\)*[
\t]+" nil t)
(when (looking-at "\\([0-9]\\{1,3\\}\\)%")
(setq load-percentage (match-string 1))
(goto-char (match-end 0))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 25dca60: Fix compatibility with macOS 10.12 pmset (bug#24537),
Alan Third <=