diff options
| author | Alan Third | 2016-09-29 20:22:00 +0100 |
|---|---|---|
| committer | Alan Third | 2016-09-30 21:43:38 +0100 |
| commit | 25dca60d5e3b2447352b7c51496baefb4ccd579d (patch) | |
| tree | ef8172d854f35da67e060a55d584eacf945093e1 | |
| parent | f4eb8900295d75c4afec256f75aea22494376fde (diff) | |
| download | emacs-25dca60d5e3b2447352b7c51496baefb4ccd579d.tar.gz emacs-25dca60d5e3b2447352b7c51496baefb4ccd579d.zip | |
Fix compatibility with macOS 10.12 pmset (bug#24537)
* lisp/battery.el (battery-pmset): Recognise and ignore battery id if
present in output.
| -rw-r--r-- | lisp/battery.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/battery.el b/lisp/battery.el index 1b58489161e..e6e79b06bab 100644 --- a/lisp/battery.el +++ b/lisp/battery.el | |||
| @@ -625,7 +625,7 @@ The following %-sequences are provided: | |||
| 625 | (goto-char (point-min)) | 625 | (goto-char (point-min)) |
| 626 | (when (re-search-forward "\\(?:Currentl?y\\|Now\\) drawing from '\\(AC\\|Battery\\) Power'" nil t) | 626 | (when (re-search-forward "\\(?:Currentl?y\\|Now\\) drawing from '\\(AC\\|Battery\\) Power'" nil t) |
| 627 | (setq power-source (match-string 1)) | 627 | (setq power-source (match-string 1)) |
| 628 | (when (re-search-forward "^ -InternalBattery-0[ \t]+" nil t) | 628 | (when (re-search-forward "^ -InternalBattery-0\\([ \t]+(id=[0-9]+)\\)*[ \t]+" nil t) |
| 629 | (when (looking-at "\\([0-9]\\{1,3\\}\\)%") | 629 | (when (looking-at "\\([0-9]\\{1,3\\}\\)%") |
| 630 | (setq load-percentage (match-string 1)) | 630 | (setq load-percentage (match-string 1)) |
| 631 | (goto-char (match-end 0)) | 631 | (goto-char (match-end 0)) |