mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(display-battery): Use `add-to-list'.
This commit is contained in:
parent
c8bfa68964
commit
862a7e281e
2 changed files with 7 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
;;; battery.el --- display battery status information.
|
||||
|
||||
;; Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org>
|
||||
;; Keywords: hardware
|
||||
|
|
@ -108,9 +108,7 @@ seconds."
|
|||
(interactive)
|
||||
(setq battery-mode-line-string "")
|
||||
(or global-mode-string (setq global-mode-string '("")))
|
||||
(or (memq 'battery-mode-line-string global-mode-string)
|
||||
(setq global-mode-string (append global-mode-string
|
||||
'(battery-mode-line-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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue