Commit 862a7e28 authored by Miles Bader's avatar Miles Bader
Browse files

(display-battery): Use `add-to-list'.

parent c8bfa689
2000-10-10 Miles Bader <miles@lsi.nec.co.jp>
* subr.el (add-to-list): Add optional argument APPEND.
* battery.el (display-battery): Use `add-to-list'.
2000-10-09 Thien-Thi Nguyen <ttn@gnu.org>
* play/zone.el (zone-timer, zone-wc-tbl): Rework
......
;;; 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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment