From: Lars Ingebrigtsen Date: Tue, 30 Jul 2019 11:07:17 +0000 (+0200) Subject: Use decoded time accessors in appt X-Git-Tag: emacs-27.0.90~1817^2~20 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e3bbd665a9ab8208fdc9c20aee8ac0b4cee682d8;p=emacs.git Use decoded time accessors in appt * lisp/calendar/appt.el (appt-check, appt-make-list): Use decoded time accessors. --- 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)))))))