changeset 38292:1c462d61083a

(battery-update): Add help-echo. From Pavel Jan,Bm(Bk <Pavel@Janik.cz>.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 05 Jul 2001 13:35:41 +0000
parents a13b229de6d7
children 6a1826f2e4c6
files lisp/battery.el
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/battery.el	Thu Jul 05 09:25:36 2001 +0000
+++ b/lisp/battery.el	Thu Jul 05 13:35:41 2001 +0000
@@ -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 @@
 
 (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))