aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Francoise2005-12-25 14:09:57 +0000
committerRomain Francoise2005-12-25 14:09:57 +0000
commit180a4473763d5181502b287c7ec492e5fb3a3244 (patch)
treeb2588ce8e7d89f47126a05bb1bebde828f572f19
parent3a5050af4c3c94df335172fd80315b7599f9638c (diff)
downloademacs-180a4473763d5181502b287c7ec492e5fb3a3244.tar.gz
emacs-180a4473763d5181502b287c7ec492e5fb3a3244.zip
(battery-linux-proc-acpi): Also try
`/proc/acpi/thermal_zone/THM0/temperature'.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/battery.el8
2 files changed, 13 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6b2e4f72403..91cc1de5b7f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12005-12-25 Romain Francoise <romain@orebokech.com>
2
3 * battery.el (battery-linux-proc-acpi): Also try
4 `/proc/acpi/thermal_zone/THM0/temperature'.
5
12005-12-24 Chong Yidong <cyd@stupidchicken.com> 62005-12-24 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * custom.el (custom-push-theme): Fix docstring. 8 * custom.el (custom-push-theme): Fix docstring.
diff --git a/lisp/battery.el b/lisp/battery.el
index 649cbe4c2c3..710be5a4220 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -347,6 +347,14 @@ The following %-sequences are provided:
347 (when (re-search-forward 347 (when (re-search-forward
348 "temperature: +\\([0-9]+\\) C$" nil t) 348 "temperature: +\\([0-9]+\\) C$" nil t)
349 (match-string 1)))) 349 (match-string 1))))
350 (when (file-exists-p
351 "/proc/acpi/thermal_zone/THM0/temperature")
352 (with-temp-buffer
353 (insert-file-contents
354 "/proc/acpi/thermal_zone/THM0/temperature")
355 (when (re-search-forward
356 "temperature: +\\([0-9]+\\) C$" nil t)
357 (match-string 1))))
350 "N/A")) 358 "N/A"))
351 (cons ?r (or (and rate (concat (number-to-string rate) " " 359 (cons ?r (or (and rate (concat (number-to-string rate) " "
352 rate-type)) "N/A")) 360 rate-type)) "N/A"))