Explicitly use `current-time' to set 'LAST_REPEAT'

* lisp/org.el (org-auto-repeat-maybe): Explicitly use `current-time'
  to set LAST_REPEAT.  The behavior of the function remains the same.

This allows to advice current-time to use a different time.  Which
might help with testing and with functions which bend the time.
This commit is contained in:
Marco Wahl 2017-01-28 00:17:19 +01:00
parent 6cb6a39443
commit 50a53b3f2c
1 changed files with 2 additions and 1 deletions

View File

@ -13235,7 +13235,8 @@ This function is run automatically after each state change to a DONE state."
(org-todo to-state))
(when (or org-log-repeat (org-entry-get nil "CLOCK"))
(org-entry-put nil "LAST_REPEAT" (format-time-string
(org-time-stamp-format t t))))
(org-time-stamp-format t t)
(current-time))))
(when org-log-repeat
(if (or (memq 'org-add-log-note (default-value 'post-command-hook))
(memq 'org-add-log-note post-command-hook))