emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104209: * lisp/calendar/appt.el (app


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104209: * lisp/calendar/appt.el (appt-make-list): Simplify.
Date: Thu, 12 May 2011 18:31:53 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104209
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2011-05-12 18:31:53 -0700
message:
  * lisp/calendar/appt.el (appt-make-list): Simplify.
modified:
  lisp/ChangeLog
  lisp/calendar/appt.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-05-12 16:46:53 +0000
+++ b/lisp/ChangeLog    2011-05-13 01:31:53 +0000
@@ -1,3 +1,7 @@
+2011-05-13  Glenn Morris  <address@hidden>
+
+       * calendar/appt.el (appt-make-list): Simplify.
+
 2011-05-12  Andreas Schwab  <address@hidden>
 
        * progmodes/ld-script.el (ld-script-keywords)

=== modified file 'lisp/calendar/appt.el'
--- a/lisp/calendar/appt.el     2011-05-12 07:56:02 +0000
+++ b/lisp/calendar/appt.el     2011-05-13 01:31:53 +0000
@@ -569,15 +569,12 @@
                 (setq entry-list (cdr entry-list)))))
         (setq appt-time-msg-list (appt-sort-list appt-time-msg-list))
         ;; Convert current time to minutes after midnight (12:01am = 1),
-        ;; so that elements in the list that are earlier than the
-        ;; present time can be removed.
+        ;; and remove elements in the list that are in the past.
         (let* ((now (decode-time))
-               (cur-comp-time (+ (* 60 (nth 2 now)) (nth 1 now)))
-               (appt-comp-time (caar (car appt-time-msg-list))))
-          (while (and appt-time-msg-list (< appt-comp-time cur-comp-time))
-            (setq appt-time-msg-list (cdr appt-time-msg-list))
-            (if appt-time-msg-list
-                (setq appt-comp-time (caar (car appt-time-msg-list)))))))))
+               (now-mins (+ (* 60 (nth 2 now)) (nth 1 now))))
+          (while (and appt-time-msg-list
+                      (< (caar (car appt-time-msg-list)) now-mins))
+            (setq appt-time-msg-list (cdr appt-time-msg-list)))))))
 
 
 (defun appt-sort-list (appt-list)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]