aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2006-05-09 22:43:35 +0000
committerJuri Linkov2006-05-09 22:43:35 +0000
commit9b46a12cd5b6585885c50cb22d98be497c2388f5 (patch)
treefdd660709716cad208b111ce6ab3938e7dfada03
parentf80a56a0751e6c61fce2b74a19c47d65dec48bca (diff)
downloademacs-9b46a12cd5b6585885c50cb22d98be497c2388f5.tar.gz
emacs-9b46a12cd5b6585885c50cb22d98be497c2388f5.zip
(battery-linux-proc-acpi): Also try `/proc/acpi/thermal_zone/THR2/temperature'.
-rw-r--r--lisp/battery.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/battery.el b/lisp/battery.el
index 34f74aa9932..50edc8dde8a 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -386,6 +386,14 @@ The following %-sequences are provided:
386 (when (re-search-forward 386 (when (re-search-forward
387 "temperature: +\\([0-9]+\\) C$" nil t) 387 "temperature: +\\([0-9]+\\) C$" nil t)
388 (match-string 1)))) 388 (match-string 1))))
389 (when (file-exists-p
390 "/proc/acpi/thermal_zone/THR2/temperature")
391 (with-temp-buffer
392 (insert-file-contents
393 "/proc/acpi/thermal_zone/THR2/temperature")
394 (when (re-search-forward
395 "temperature: +\\([0-9]+\\) C$" nil t)
396 (match-string 1))))
389 "N/A")) 397 "N/A"))
390 (cons ?r (or (and rate (concat (number-to-string rate) " " 398 (cons ?r (or (and rate (concat (number-to-string rate) " "
391 rate-type)) "N/A")) 399 rate-type)) "N/A"))