diff lisp/battery.el @ 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 41bb365f41c4
children 91c501f75eea 2d92f5c9d6ae
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.