This commit is contained in:
Adam Porter 2020-11-22 13:45:00 -06:00
parent 4575a66bed
commit efae2229ed

View file

@ -410,8 +410,7 @@ It would be expanded to:
normalizers))
(preambles (cl-sublis (list (cons 'predicate-names (cons 'or (--map (list 'quote it) predicate-names))))
preambles)))
`(progn
(cl-eval-when (compile load eval)
`(cl-eval-when (compile load eval)
;; When compiling, the predicate must be added to `org-ql-predicates' before `org-ql--def-query-string-to-sexp-fn'
;; is called to define `org-ql--query-string-to-sexp'. Otherwise, `org-ql--query-string-to-sexp' seems to work properly
;; when interpreted but not always when the file is byte-compiled.
@ -423,7 +422,7 @@ It would be expanded to:
;; NOTE: Reversing is important!
(org-ql--define-preamble-fn (reverse org-ql-predicates))
(org-ql--def-query-string-to-sexp-fn))
(cl-defun ,fn-name ,args ,docstring ,body)))))
(cl-defun ,fn-name ,args ,docstring ,body))))
;; TODO: Mark as obsolete/deprecated.
;;;###autoload