summaryrefslogtreecommitdiff
path: root/lisp/org/org-clock.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-12-16 09:40:21 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-12-16 11:17:25 -0800
commitdd0727e1ec1f535b9b06be88173b4d3ccd55abcb (patch)
treeeb6c05dfc0acdb90cd6d774447bba1b5e701a3d1 /lisp/org/org-clock.el
parent3e6c69de9d1ae99ebb71eb2ed04bdb9ee42cbb80 (diff)
downloademacs-dd0727e1ec1f535b9b06be88173b4d3ccd55abcb.tar.gz
emacs-dd0727e1ec1f535b9b06be88173b4d3ccd55abcb.tar.bz2
emacs-dd0727e1ec1f535b9b06be88173b4d3ccd55abcb.zip
encode-time simplifications
* lisp/gnus/gnus-search.el (gnus-search-query-parse-date): * lisp/net/soap-client.el (soap-decode-date-time): * lisp/net/tramp-adb.el (tramp-adb-ls-output-time-less-p): * lisp/org/ol.el (org-store-link): * lisp/org/org-clock.el (org-clock-sum) (org-clock-update-time-maybe): * lisp/org/org-colview.el (org-colview-construct-allowed-dates): * lisp/org/org-macro.el (org-macro--vc-modified-time): * lisp/org/org-macs.el (org-2ft, org-matcher-time): * lisp/org/org-table.el (org-table-eval-formula): * lisp/org/org.el (org-read-date, org-display-custom-time) (org-time-string-to-time, org-timestamp-change): Prefer (encode-time L) to (apply #'encode-time L) where either will do. * lisp/gnus/gnus-search.el (gnus-search-imap-handle-date): * lisp/org/org-clock.el (org-clocktable-steps): Prefer (encode-time S M ...) to (apply #'encode-time (list S M ...)).
Diffstat (limited to 'lisp/org/org-clock.el')
-rw-r--r--lisp/org/org-clock.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 12a4c2b7b71..2526ca793aa 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -1904,11 +1904,11 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
((match-end 2)
;; Two time stamps.
(let* ((ts (float-time
- (apply #'encode-time
+ (encode-time
(save-match-data
(org-parse-time-string (match-string 2))))))
(te (float-time
- (apply #'encode-time
+ (encode-time
(org-parse-time-string (match-string 3)))))
(dt (- (if tend (min te tend) te)
(if tstart (max ts tstart) ts))))
@@ -2837,7 +2837,7 @@ a number of clock tables."
(pcase (if range (car range) (plist-get params :tstart))
((and (pred numberp) n)
(pcase-let ((`(,m ,d ,y) (calendar-gregorian-from-absolute n)))
- (apply #'encode-time (list 0 0 org-extend-today-until d m y))))
+ (encode-time 0 0 org-extend-today-until d m y)))
(timestamp
(seconds-to-time
(org-matcher-time (or timestamp
@@ -2847,7 +2847,7 @@ a number of clock tables."
(pcase (if range (nth 1 range) (plist-get params :tend))
((and (pred numberp) n)
(pcase-let ((`(,m ,d ,y) (calendar-gregorian-from-absolute n)))
- (apply #'encode-time (list 0 0 org-extend-today-until d m y))))
+ (encode-time 0 0 org-extend-today-until d m y)))
(timestamp (seconds-to-time (org-matcher-time timestamp))))))
(while (time-less-p start end)
(unless (bolp) (insert "\n"))
@@ -3042,9 +3042,9 @@ Otherwise, return nil."
(setq ts (match-string 1)
te (match-string 3))
(setq s (- (float-time
- (apply #'encode-time (org-parse-time-string te)))
+ (encode-time (org-parse-time-string te)))
(float-time
- (apply #'encode-time (org-parse-time-string ts))))
+ (encode-time (org-parse-time-string ts))))
neg (< s 0)
s (abs s)
h (floor (/ s 3600))