[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/battery.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/battery.el,v |
Date: |
Wed, 10 Jan 2007 01:20:11 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 07/01/10 01:20:10
Index: battery.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/battery.el,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- battery.el 8 Jan 2007 23:00:24 -0000 1.39
+++ battery.el 10 Jan 2007 01:20:10 -0000 1.40
@@ -357,15 +357,17 @@
(list (cons ?c (or (and capacity (number-to-string capacity)) "N/A"))
(cons ?L (or (battery-search-for-one-match-in-files
(mapcar (lambda (e) (concat e "/state"))
+ (ignore-errors
(directory-files "/proc/acpi/ac_adapter/"
- t "\\`[^.]"))
+ t "\\`[^.]")))
"state: +\\(.*\\)$" 1)
"N/A"))
(cons ?d (or (battery-search-for-one-match-in-files
(mapcar (lambda (e) (concat e "/temperature"))
+ (ignore-errors
(directory-files "/proc/acpi/thermal_zone/"
- t "\\`[^.]"))
+ t "\\`[^.]")))
"temperature: +\\([0-9]+\\) C$" 1)
"N/A"))