[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: battery.el & missing ignore-errors expansion
From: |
Richard M. Stallman |
Subject: |
Re: battery.el & missing ignore-errors expansion |
Date: |
Tue, 02 Aug 2005 02:27:46 -0400 |
It doesn't work because the defcustom initial value is interpreted.
So how about this patch?
*** battery.el 05 Jul 2005 12:17:50 -0400 1.28
--- battery.el 01 Aug 2005 15:29:22 -0400
***************
*** 49,58 ****
(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)))))
'battery-pmset))
"*Function for getting battery status information.
The function has to return an alist of conversion definitions.
--- 49,59 ----
(file-directory-p "/proc/acpi/battery"))
'battery-linux-proc-acpi)
((and (eq system-type 'darwin)
! (condition-case ()
(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.