diff options
author | Miles Bader <miles@gnu.org> | 2000-10-10 02:48:40 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2000-10-10 02:48:40 +0000 |
commit | 862a7e281e2a3eaae9f527b8d361d33bff7bc0dd (patch) | |
tree | 30cd567e512f5f6ad59c12997b42580016ba975e /lisp/battery.el | |
parent | c8bfa68964432f0d00c23917a7c8a28dca5ae1a3 (diff) | |
download | emacs-862a7e281e2a3eaae9f527b8d361d33bff7bc0dd.tar.gz |
(display-battery): Use `add-to-list'.
Diffstat (limited to 'lisp/battery.el')
-rw-r--r-- | lisp/battery.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/battery.el b/lisp/battery.el index d8171874c3d..ccafa8bf213 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -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)) |