]> git.eshelyaron.com Git - emacs.git/commitdiff
(battery-linux-proc-acpi): Also try
authorRomain Francoise <romain@orebokech.com>
Sun, 25 Dec 2005 14:09:57 +0000 (14:09 +0000)
committerRomain Francoise <romain@orebokech.com>
Sun, 25 Dec 2005 14:09:57 +0000 (14:09 +0000)
`/proc/acpi/thermal_zone/THM0/temperature'.

lisp/ChangeLog
lisp/battery.el

index 6b2e4f72403617206450078343c7d1f5d59eb936..91cc1de5b7f6d2a8af258c6f4633351bcf1c42ce 100644 (file)
@@ -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.
index 649cbe4c2c3df2e7a0d4299a287680de12361d8a..710be5a422002352f8196b36c50c632d3fbf9e7d 100644 (file)
@@ -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"))