aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-07-30 13:07:17 +0200
committerLars Ingebrigtsen2019-07-30 13:07:17 +0200
commite3bbd665a9ab8208fdc9c20aee8ac0b4cee682d8 (patch)
tree3eab3943af8e5d9a2bb6425ad6cc690a6d1961ff
parentbd3bc1c924d4b65f0413a7df9b74f6facd0d2a1a (diff)
downloademacs-e3bbd665a9ab8208fdc9c20aee8ac0b4cee682d8.tar.gz
emacs-e3bbd665a9ab8208fdc9c20aee8ac0b4cee682d8.zip
Use decoded time accessors in appt
* lisp/calendar/appt.el (appt-check, appt-make-list): Use decoded time accessors.
-rw-r--r--lisp/calendar/appt.el5
1 files 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:
325 (prev-appt-display-count appt-display-count) 325 (prev-appt-display-count appt-display-count)
326 ;; Convert current time to minutes after midnight (12.01am = 1). 326 ;; Convert current time to minutes after midnight (12.01am = 1).
327 (now (decode-time)) 327 (now (decode-time))
328 (now-mins (+ (* 60 (nth 2 now)) (nth 1 now))) 328 (now-mins (+ (* 60 (decoded-time-hour now)) (decoded-time-minute now)))
329 appt-mins appt-warn-time min-to-app min-list string-list) 329 appt-mins appt-warn-time min-to-app min-list string-list)
330 (save-excursion ; FIXME ? 330 (save-excursion ; FIXME ?
331 ;; At first check in any day, update appointments to today's list. 331 ;; 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."
647 ;; Convert current time to minutes after midnight (12:01am = 1), 647 ;; Convert current time to minutes after midnight (12:01am = 1),
648 ;; and remove elements in the list that are in the past. 648 ;; and remove elements in the list that are in the past.
649 (let* ((now (decode-time)) 649 (let* ((now (decode-time))
650 (now-mins (+ (* 60 (nth 2 now)) (nth 1 now)))) 650 (now-mins (+ (* 60 (decoded-time-hour now))
651 (decoded-time-minute now))))
651 (while (and appt-time-msg-list 652 (while (and appt-time-msg-list
652 (< (caar (car appt-time-msg-list)) now-mins)) 653 (< (caar (car appt-time-msg-list)) now-mins))
653 (setq appt-time-msg-list (cdr appt-time-msg-list))))))) 654 (setq appt-time-msg-list (cdr appt-time-msg-list)))))))