Mercurial > emacs
comparison lisp/battery.el @ 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 | 9ed7c3f74e35 |
children | b174db545cfd |
comparison
equal
deleted
inserted
replaced
38291:a13b229de6d7 | 38292:1c462d61083a |
---|---|
1 ;;; battery.el --- display battery status information. | 1 ;;; battery.el --- display battery status information. |
2 | 2 |
3 ;; Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org> | 5 ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org> |
6 ;; Keywords: hardware | 6 ;; Keywords: hardware |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
118 (battery-update) | 118 (battery-update) |
119 (sit-for 0)) | 119 (sit-for 0)) |
120 | 120 |
121 (defun battery-update () | 121 (defun battery-update () |
122 "Update battery status information in the mode line." | 122 "Update battery status information in the mode line." |
123 (setq battery-mode-line-string (if (and battery-mode-line-format | 123 (setq battery-mode-line-string (propertize (if (and battery-mode-line-format |
124 battery-status-function) | 124 battery-status-function) |
125 (battery-format | 125 (battery-format |
126 battery-mode-line-format | 126 battery-mode-line-format |
127 (funcall battery-status-function)) | 127 (funcall battery-status-function)) |
128 "")) | 128 "") |
129 'help-echo "Battery status information")) | |
129 (force-mode-line-update)) | 130 (force-mode-line-update)) |
130 | 131 |
131 | 132 |
132 ;;; `/proc/apm' interface for Linux. | 133 ;;; `/proc/apm' interface for Linux. |
133 | 134 |