emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 66a74f8 09/13: Use decoded time accessors in timer


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

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

    Use decoded time accessors in timer
    
    * lisp/emacs-lisp/timer.el (run-at-time): Use decoded time
    accessors.
---
 lisp/emacs-lisp/timer.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 22ccc35..400f00a 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -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"))



reply via email to

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