summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-07-05 13:36:03 +0000
committerGerd Moellmann <gerd@gnu.org>2001-07-05 13:36:03 +0000
commit0f60e5ffda939b8866cf8c07d87bad69d06695bb (patch)
tree498a5d868f5a8e15233cd25aa3b481a8ef248e4b
parent0967b4b07b65796d2c8b5d5579d790741bae99f1 (diff)
downloademacs-0f60e5ffda939b8866cf8c07d87bad69d06695bb.tar.gz
(battery-update): Add help-echo.
From Pavel Jan,Bm(Bk <Pavel@Janik.cz>.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/battery.el15
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 37908b8bacd..625916563e6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-05 Gerd Moellmann <gerd@gnu.org>
+
+ * battery.el (battery-update): Add help-echo.
+ From Pavel Jan,Bm(Bk <Pavel@Janik.cz>.
+
2001-07-04 Gerd Moellmann <gerd@gnu.org>
* font-lock.el (c-font-lock-keywords-3): When matching something
diff --git a/lisp/battery.el b/lisp/battery.el
index 67e129b9330..9ab5d20d0ac 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -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))