Mercurial > emacs
changeset 64907:08b55dc9bcd1
(battery-status-function): Don't use ignore-errors.
author | Lute Kamstra <lute@gnu.org> |
---|---|
date | Thu, 11 Aug 2005 13:28:47 +0000 |
parents | 63dd464bce2d |
children | 45df3993d950 |
files | lisp/battery.el |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/battery.el Thu Aug 11 10:24:48 2005 +0000 +++ b/lisp/battery.el Thu Aug 11 13:28:47 2005 +0000 @@ -49,10 +49,11 @@ (file-directory-p "/proc/acpi/battery")) 'battery-linux-proc-acpi) ((and (eq system-type 'darwin) - (ignore-errors - (with-temp-buffer - (and (eq (call-process "pmset" nil t nil "-g" "ps") 0) - (> (buffer-size) 0))))) + (condition-case nil + (with-temp-buffer + (and (eq (call-process "pmset" nil t nil "-g" "ps") 0) + (> (buffer-size) 0))) + (error nil))) 'battery-pmset)) "*Function for getting battery status information. The function has to return an alist of conversion definitions.