]> git.eshelyaron.com Git - emacs.git/commitdiff
(battery-update): Add help-echo.
authorGerd Moellmann <gerd@gnu.org>
Thu, 5 Jul 2001 13:36:03 +0000 (13:36 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 5 Jul 2001 13:36:03 +0000 (13:36 +0000)
From Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>.

lisp/ChangeLog
lisp/battery.el

index 37908b8bacd185aa51245d70a0b75fd6010e830b..625916563e66a15a2976c65ded6bded4de80cdbb 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-05  Gerd Moellmann  <gerd@gnu.org>
+
+       * battery.el (battery-update): Add help-echo.
+       From Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>.
+
 2001-07-04  Gerd Moellmann  <gerd@gnu.org>
 
        * font-lock.el (c-font-lock-keywords-3): When matching something
index 67e129b93309e647321ac88d56413a6e6b60e4bc..9ab5d20d0ac5fab04a5d1cd93cf2ab5b8ecc90d0 100644 (file)
@@ -1,6 +1,6 @@
 ;;; battery.el --- display battery status information.
 
-;; Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
 
 ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org>
 ;; Keywords: hardware
@@ -120,12 +120,13 @@ seconds."
 
 (defun battery-update ()
   "Update battery status information in the mode line."
-  (setq battery-mode-line-string (if (and battery-mode-line-format
-                                         battery-status-function)
-                                    (battery-format
-                                     battery-mode-line-format
-                                     (funcall battery-status-function))
-                                  ""))
+  (setq battery-mode-line-string (propertize (if (and battery-mode-line-format
+                                                     battery-status-function)
+                                                (battery-format
+                                                 battery-mode-line-format
+                                                 (funcall battery-status-function))
+                                              "")
+                                            'help-echo "Battery status information"))
   (force-mode-line-update))
 
 \f