# HG changeset patch # User Romain Francoise # Date 1135519797 0 # Node ID 91c501f75eead155c1a145ec2e2314eb9b34d439 # Parent 66142acef663b678a574b5f2dbb15decc2c98998 (battery-linux-proc-acpi): Also try `/proc/acpi/thermal_zone/THM0/temperature'. diff -r 66142acef663 -r 91c501f75eea lisp/ChangeLog --- a/lisp/ChangeLog Sat Dec 24 17:35:22 2005 +0000 +++ b/lisp/ChangeLog Sun Dec 25 14:09:57 2005 +0000 @@ -1,3 +1,8 @@ +2005-12-25 Romain Francoise + + * battery.el (battery-linux-proc-acpi): Also try + `/proc/acpi/thermal_zone/THM0/temperature'. + 2005-12-24 Chong Yidong * custom.el (custom-push-theme): Fix docstring. diff -r 66142acef663 -r 91c501f75eea lisp/battery.el --- a/lisp/battery.el Sat Dec 24 17:35:22 2005 +0000 +++ b/lisp/battery.el Sun Dec 25 14:09:57 2005 +0000 @@ -347,6 +347,14 @@ (when (re-search-forward "temperature: +\\([0-9]+\\) C$" nil t) (match-string 1)))) + (when (file-exists-p + "/proc/acpi/thermal_zone/THM0/temperature") + (with-temp-buffer + (insert-file-contents + "/proc/acpi/thermal_zone/THM0/temperature") + (when (re-search-forward + "temperature: +\\([0-9]+\\) C$" nil t) + (match-string 1)))) "N/A")) (cons ?r (or (and rate (concat (number-to-string rate) " " rate-type)) "N/A"))