diff options
| author | Glenn Morris | 2011-05-12 18:31:53 -0700 |
|---|---|---|
| committer | Glenn Morris | 2011-05-12 18:31:53 -0700 |
| commit | 5233edd7e8b9b5bfdb200b5fa287689a65ff794f (patch) | |
| tree | 5985a0bcc894a054403b0d05f2e6ecbb003e465a /lisp | |
| parent | 92d1079638fad7c31cf11cd608f33d3385e24b39 (diff) | |
| download | emacs-5233edd7e8b9b5bfdb200b5fa287689a65ff794f.tar.gz emacs-5233edd7e8b9b5bfdb200b5fa287689a65ff794f.zip | |
* lisp/calendar/appt.el (appt-make-list): Simplify.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/calendar/appt.el | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a592ae39ac0..0eda5afc12d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-05-13 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * calendar/appt.el (appt-make-list): Simplify. | ||
| 4 | |||
| 1 | 2011-05-12 Andreas Schwab <schwab@linux-m68k.org> | 5 | 2011-05-12 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 6 | ||
| 3 | * progmodes/ld-script.el (ld-script-keywords) | 7 | * progmodes/ld-script.el (ld-script-keywords) |
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index dce6cc28239..366117277d3 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -569,15 +569,12 @@ Any appointments made with `appt-add' are not affected by this function." | |||
| 569 | (setq entry-list (cdr entry-list))))) | 569 | (setq entry-list (cdr entry-list))))) |
| 570 | (setq appt-time-msg-list (appt-sort-list appt-time-msg-list)) | 570 | (setq appt-time-msg-list (appt-sort-list appt-time-msg-list)) |
| 571 | ;; Convert current time to minutes after midnight (12:01am = 1), | 571 | ;; Convert current time to minutes after midnight (12:01am = 1), |
| 572 | ;; so that elements in the list that are earlier than the | 572 | ;; and remove elements in the list that are in the past. |
| 573 | ;; present time can be removed. | ||
| 574 | (let* ((now (decode-time)) | 573 | (let* ((now (decode-time)) |
| 575 | (cur-comp-time (+ (* 60 (nth 2 now)) (nth 1 now))) | 574 | (now-mins (+ (* 60 (nth 2 now)) (nth 1 now)))) |
| 576 | (appt-comp-time (caar (car appt-time-msg-list)))) | 575 | (while (and appt-time-msg-list |
| 577 | (while (and appt-time-msg-list (< appt-comp-time cur-comp-time)) | 576 | (< (caar (car appt-time-msg-list)) now-mins)) |
| 578 | (setq appt-time-msg-list (cdr appt-time-msg-list)) | 577 | (setq appt-time-msg-list (cdr appt-time-msg-list))))))) |
| 579 | (if appt-time-msg-list | ||
| 580 | (setq appt-comp-time (caar (car appt-time-msg-list))))))))) | ||
| 581 | 578 | ||
| 582 | 579 | ||
| 583 | (defun appt-sort-list (appt-list) | 580 | (defun appt-sort-list (appt-list) |