emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/battery.el


From: Romain Francoise
Subject: [Emacs-diffs] Changes to emacs/lisp/battery.el
Date: Sun, 25 Dec 2005 14:09:58 +0000

Index: emacs/lisp/battery.el
diff -u emacs/lisp/battery.el:1.30 emacs/lisp/battery.el:1.31
--- emacs/lisp/battery.el:1.30  Thu Aug 11 13:28:47 2005
+++ emacs/lisp/battery.el       Sun Dec 25 14:09:57 2005
@@ -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"))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]