From 862a7e281e2a3eaae9f527b8d361d33bff7bc0dd Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 10 Oct 2000 02:48:40 +0000 Subject: [PATCH] (display-battery): Use `add-to-list'. --- lisp/ChangeLog | 5 +++++ lisp/battery.el | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cec95234ca2..fbcdf3e4cc7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-10-10 Miles Bader + + * subr.el (add-to-list): Add optional argument APPEND. + * battery.el (display-battery): Use `add-to-list'. + 2000-10-09 Thien-Thi Nguyen * play/zone.el (zone-timer, zone-wc-tbl): Rework 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 ;; 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)) -- 2.39.2