emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master e3bbd66 06/13: Use decoded time accessors in appt


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master e3bbd66 06/13: Use decoded time accessors in appt
Date: Tue, 30 Jul 2019 07:12:06 -0400 (EDT)

branch: master
commit e3bbd665a9ab8208fdc9c20aee8ac0b4cee682d8
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Use decoded time accessors in appt
    
    * lisp/calendar/appt.el (appt-check, appt-make-list): Use decoded
    time accessors.
---
 lisp/calendar/appt.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index b7aa212..944054e 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -325,7 +325,7 @@ displayed in a window:
          (prev-appt-display-count appt-display-count)
          ;; Convert current time to minutes after midnight (12.01am = 1).
          (now (decode-time))
-         (now-mins (+ (* 60 (nth 2 now)) (nth 1 now)))
+         (now-mins (+ (* 60 (decoded-time-hour now)) (decoded-time-minute 
now)))
          appt-mins appt-warn-time min-to-app min-list string-list)
     (save-excursion                   ; FIXME ?
       ;; At first check in any day, update appointments to today's list.
@@ -647,7 +647,8 @@ Any appointments made with `appt-add' are not affected by 
this function."
         ;; Convert current time to minutes after midnight (12:01am = 1),
         ;; and remove elements in the list that are in the past.
         (let* ((now (decode-time))
-               (now-mins (+ (* 60 (nth 2 now)) (nth 1 now))))
+               (now-mins (+ (* 60 (decoded-time-hour now))
+                            (decoded-time-minute 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)))))))



reply via email to

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