summaryrefslogtreecommitdiff
path: root/lisp/battery.el
diff options
context:
space:
mode:
authorLute Kamstra <lute@gnu.org>2005-08-11 13:28:47 +0000
committerLute Kamstra <lute@gnu.org>2005-08-11 13:28:47 +0000
commit248634e90d3a9174c38a5c7a748b7913367ffc66 (patch)
tree1d714faeb61267cba218e370dba516af741a7e62 /lisp/battery.el
parentaa6f7b965f301cdb0df09d448f4c5437c6f40e76 (diff)
downloademacs-248634e90d3a9174c38a5c7a748b7913367ffc66.tar.gz
(battery-status-function): Don't use ignore-errors.
Diffstat (limited to 'lisp/battery.el')
-rw-r--r--lisp/battery.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/battery.el b/lisp/battery.el
index 125e037719e..649cbe4c2c3 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -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.