]> git.eshelyaron.com Git - emacs.git/commitdiff
(battery-status-function): Don't use ignore-errors.
authorLute Kamstra <lute@gnu.org>
Thu, 11 Aug 2005 13:28:47 +0000 (13:28 +0000)
committerLute Kamstra <lute@gnu.org>
Thu, 11 Aug 2005 13:28:47 +0000 (13:28 +0000)
lisp/battery.el

index 125e037719e3a4da7711524c818b44ba2131c5b6..649cbe4c2c3df2e7a0d4299a287680de12361d8a 100644 (file)
              (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.