diff options
| author | Miles Bader | 2000-10-10 02:48:40 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-10-10 02:48:40 +0000 |
| commit | 862a7e281e2a3eaae9f527b8d361d33bff7bc0dd (patch) | |
| tree | 30cd567e512f5f6ad59c12997b42580016ba975e | |
| parent | c8bfa68964432f0d00c23917a7c8a28dca5ae1a3 (diff) | |
| download | emacs-862a7e281e2a3eaae9f527b8d361d33bff7bc0dd.tar.gz emacs-862a7e281e2a3eaae9f527b8d361d33bff7bc0dd.zip | |
(display-battery): Use `add-to-list'.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2000-10-10 Miles Bader <miles@lsi.nec.co.jp> | ||
| 2 | |||
| 3 | * subr.el (add-to-list): Add optional argument APPEND. | ||
| 4 | * battery.el (display-battery): Use `add-to-list'. | ||
| 5 | |||
| 1 | 2000-10-09 Thien-Thi Nguyen <ttn@gnu.org> | 6 | 2000-10-09 Thien-Thi Nguyen <ttn@gnu.org> |
| 2 | 7 | ||
| 3 | * play/zone.el (zone-timer, zone-wc-tbl): Rework | 8 | * 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 @@ | |||
| 1 | ;;; battery.el --- display battery status information. | 1 | ;;; battery.el --- display battery status information. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 1998 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org> | 5 | ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org> |
| 6 | ;; Keywords: hardware | 6 | ;; Keywords: hardware |
| @@ -108,9 +108,7 @@ seconds." | |||
| 108 | (interactive) | 108 | (interactive) |
| 109 | (setq battery-mode-line-string "") | 109 | (setq battery-mode-line-string "") |
| 110 | (or global-mode-string (setq global-mode-string '(""))) | 110 | (or global-mode-string (setq global-mode-string '(""))) |
| 111 | (or (memq 'battery-mode-line-string global-mode-string) | 111 | (add-to-list 'global-mode-string 'battery-mode-line-string t) |
| 112 | (setq global-mode-string (append global-mode-string | ||
| 113 | '(battery-mode-line-string)))) | ||
| 114 | (and battery-update-timer (cancel-timer battery-update-timer)) | 112 | (and battery-update-timer (cancel-timer battery-update-timer)) |
| 115 | (setq battery-update-timer (run-at-time nil battery-update-interval | 113 | (setq battery-update-timer (run-at-time nil battery-update-interval |
| 116 | 'battery-update-handler)) | 114 | 'battery-update-handler)) |