X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/8121e4813da7e5898eb216a5de3c17f4875cac61..6ae948d87e16588cd1c2a08d41331923e9786109:/lisp/battery.el diff --git a/lisp/battery.el b/lisp/battery.el index d4e4d8b3a3..28ddf368f5 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -1,6 +1,6 @@ ;;; battery.el --- display battery status information -*- coding: utf-8 -*- -;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2014 Free Software Foundation, Inc. ;; Author: Ralph Schleicher ;; Keywords: hardware @@ -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\\}\\)%")