aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-01-10 01:20:10 +0000
committerRichard M. Stallman2007-01-10 01:20:10 +0000
commitb8e3d88f5836dcecd1ac93fcb67a99ed2369b3d5 (patch)
treef8ec9e1081f76652e43244750baeb3253f11f78e
parent271fffd98764a8355c96069e0f362fcd4bdf7c84 (diff)
downloademacs-b8e3d88f5836dcecd1ac93fcb67a99ed2369b3d5.tar.gz
emacs-b8e3d88f5836dcecd1ac93fcb67a99ed2369b3d5.zip
(battery-linux-proc-acpi): Use ignore-errors around calls to directory-files.
-rw-r--r--lisp/battery.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/battery.el b/lisp/battery.el
index 1b1b77ec8e3..aec6865dc06 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -357,15 +357,17 @@ The following %-sequences are provided:
357 (list (cons ?c (or (and capacity (number-to-string capacity)) "N/A")) 357 (list (cons ?c (or (and capacity (number-to-string capacity)) "N/A"))
358 (cons ?L (or (battery-search-for-one-match-in-files 358 (cons ?L (or (battery-search-for-one-match-in-files
359 (mapcar (lambda (e) (concat e "/state")) 359 (mapcar (lambda (e) (concat e "/state"))
360 (directory-files "/proc/acpi/ac_adapter/" 360 (ignore-errors
361 t "\\`[^.]")) 361 (directory-files "/proc/acpi/ac_adapter/"
362 t "\\`[^.]")))
362 "state: +\\(.*\\)$" 1) 363 "state: +\\(.*\\)$" 1)
363 364
364 "N/A")) 365 "N/A"))
365 (cons ?d (or (battery-search-for-one-match-in-files 366 (cons ?d (or (battery-search-for-one-match-in-files
366 (mapcar (lambda (e) (concat e "/temperature")) 367 (mapcar (lambda (e) (concat e "/temperature"))
367 (directory-files "/proc/acpi/thermal_zone/" 368 (ignore-errors
368 t "\\`[^.]")) 369 (directory-files "/proc/acpi/thermal_zone/"
370 t "\\`[^.]")))
369 "temperature: +\\([0-9]+\\) C$" 1) 371 "temperature: +\\([0-9]+\\) C$" 1)
370 372
371 "N/A")) 373 "N/A"))