Change: (org-ql--org-timestamp-element<) Use macrolet

Should be a small performance improvement, avoiding funcall overhead.
This commit is contained in:
Adam Porter 2018-07-10 08:26:55 -05:00
parent 51a472ffa8
commit c605ccbaf3

View file

@ -333,9 +333,9 @@ Deadline is considered before scheduled."
(defun org-ql--org-timestamp-element< (a b)
"Return non-nil if A's date element is earlier than B's.
A and B are Org timestamp elements."
(cl-flet ((ts (ts)
(when ts
(org-timestamp-format ts "%s"))))
(cl-macrolet ((ts (ts)
`(when ,ts
(org-timestamp-format ,ts "%s"))))
(let* ((a-ts (ts a))
(b-ts (ts b)))
(cond ((and a-ts b-ts)