1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:21:46 +00:00

Use decoded time accessors in timer

* lisp/emacs-lisp/timer.el (run-at-time): Use decoded time
accessors.
This commit is contained in:
Lars Ingebrigtsen 2019-07-30 13:08:49 +02:00
parent c859bc07c9
commit 66a74f8415

View File

@ -375,8 +375,11 @@ This function returns a timer object which you can use in
(now (decode-time)))
(if (>= hhmm 0)
(setq time
(encode-time 0 (% hhmm 100) (/ hhmm 100) (nth 3 now)
(nth 4 now) (nth 5 now) (nth 8 now)))))))
(encode-time 0 (% hhmm 100) (/ hhmm 100)
(decoded-time-day now)
(decoded-time-month now)
(decoded-time-year now)
(decoded-time-zone now)))))))
(or (consp time)
(error "Invalid time format"))