Mercurial > emacs
changeset 32356:fb23c215bdc8
(display-battery): Use `add-to-list'.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 10 Oct 2000 02:47:58 +0000 |
parents | 6bf2ae19e286 |
children | e8a33eb0e2b4 |
files | lisp/battery.el |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/battery.el Tue Oct 10 02:47:30 2000 +0000 +++ b/lisp/battery.el Tue Oct 10 02:47:58 2000 +0000 @@ -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 @@ (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))