From e3bbd665a9ab8208fdc9c20aee8ac0b4cee682d8 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 30 Jul 2019 13:07:17 +0200 Subject: [PATCH] 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 b7aa2123a43..944054eee35 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))))))) -- 2.39.2