Fix: Add autoloads

Fixes #36.  Thanks to Akira Komamura (@akirak).
This commit is contained in:
Akira Komamura 2019-08-31 23:40:49 -05:00 committed by Adam Porter
parent 42947aa2df
commit 3a5e4a1e11
3 changed files with 11 additions and 0 deletions

View file

@ -120,6 +120,7 @@ match."
(push (list :name ',pred-name :fn ',fn-name :docstring ,docstring :args ',args) org-ql-predicates)
(cl-defun ,fn-name ,args ,docstring ,@body))))
;;;###autoload
(cl-defmacro org-ql (buffers-or-files query &key sort narrow action)
"Expands into a call to `org-ql-select' with the same arguments.
For convenience, arguments should be unquoted."
@ -135,6 +136,7 @@ For convenience, arguments should be unquoted."
(define-hash-table-test 'org-ql-hash-test #'equal (lambda (args)
(sxhash-equal (prin1-to-string args))))
;;;###autoload
(cl-defun org-ql-select (buffers-or-files query &key action narrow sort)
"Return items matching QUERY in BUFFERS-OR-FILES.
@ -226,6 +228,7 @@ returns nil or non-nil."
((pred functionp) (sort items sort))
(_ (user-error "SORT must be either nil, one or a list of the defined sorting methods (see documentation), or a comparison function of two arguments")))))
;;;###autoload
(cl-defun org-ql-query (&key (select 'element-with-markers) from where narrow order-by)
"Like `org-ql-select', but arguments are named more like a SQL query.