From: Romain Francoise <romain@orebokech.com> Date: Sun, 25 Dec 2005 14:09:57 +0000 (+0000) Subject: (battery-linux-proc-acpi): Also try X-Git-Tag: emacs-pretest-22.0.90~5079 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=180a4473763d5181502b287c7ec492e5fb3a3244;p=emacs.git (battery-linux-proc-acpi): Also try `/proc/acpi/thermal_zone/THM0/temperature'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b2e4f72403..91cc1de5b7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-12-25 Romain Francoise <romain@orebokech.com> + + * battery.el (battery-linux-proc-acpi): Also try + `/proc/acpi/thermal_zone/THM0/temperature'. + 2005-12-24 Chong Yidong <cyd@stupidchicken.com> * 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: (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"))