aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-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"))