[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/battery.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/battery.el |
Date: |
Tue, 04 Jan 2005 16:35:12 -0500 |
Index: emacs/lisp/battery.el
diff -c emacs/lisp/battery.el:1.23 emacs/lisp/battery.el:1.24
*** emacs/lisp/battery.el:1.23 Mon Dec 27 16:40:50 2004
--- emacs/lisp/battery.el Tue Jan 4 21:15:08 2005
***************
*** 1,6 ****
;;; battery.el --- display battery status information
! ;; Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004
;; Free Software Foundation, Inc.
;; Author: Ralph Schleicher <address@hidden>
--- 1,6 ----
;;; battery.el --- display battery status information
! ;; Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Ralph Schleicher <address@hidden>
***************
*** 108,127 ****
"Battery status not available")))
;;;###autoload
! (defun display-battery ()
"Display battery status information in the mode line.
The text being displayed in the mode line is controlled by the variables
`battery-mode-line-format' and `battery-status-function'.
The mode line will be updated automatically every `battery-update-interval'
seconds."
! (interactive)
(setq battery-mode-line-string "")
(or global-mode-string (setq global-mode-string '("")))
- (add-to-list 'global-mode-string 'battery-mode-line-string t)
(and battery-update-timer (cancel-timer battery-update-timer))
! (setq battery-update-timer (run-at-time nil battery-update-interval
! 'battery-update-handler))
! (battery-update))
(defun battery-update-handler ()
(battery-update)
--- 108,130 ----
"Battery status not available")))
;;;###autoload
! (define-minor-mode display-battery-mode
"Display battery status information in the mode line.
The text being displayed in the mode line is controlled by the variables
`battery-mode-line-format' and `battery-status-function'.
The mode line will be updated automatically every `battery-update-interval'
seconds."
! :global t
(setq battery-mode-line-string "")
(or global-mode-string (setq global-mode-string '("")))
(and battery-update-timer (cancel-timer battery-update-timer))
! (if (not display-battery-mode)
! (setq global-mode-string
! (delq 'battery-mode-line-string global-mode-string))
! (add-to-list 'global-mode-string 'battery-mode-line-string t)
! (setq battery-update-timer (run-at-time nil battery-update-interval
! 'battery-update-handler))
! (battery-update)))
(defun battery-update-handler ()
(battery-update)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/battery.el,
Stefan Monnier <=