Tidy: Docstring, add comment

This commit is contained in:
Adam Porter 2020-11-24 12:44:24 -06:00
parent 5fab48e2cd
commit 6ced616836
2 changed files with 7 additions and 4 deletions

View file

@ -1006,6 +1006,10 @@ property."
;; These functions are somewhat regrettable because of the need to keep them
;; in sync, but it seems worth it to provide users with the flexibility.
;; FIXME: `check-declare' declares that this function is not in org-ql-search, even though
;; it is. It appears to happen because `org-ql-search-directories-files' is declared with
;; `cl-defun', because when I remove "cl-", it finds it. This makes no sense, because the
;; source code of `check-declare' shows that it searches for "cl-defun" declarations.
(declare-function org-ql-search-directories-files "org-ql-search" t)
(defun org-ql-view--contract-buffers-files (buffers-files)

View file

@ -673,8 +673,8 @@ Arguments STRING, POS, FILL, and LEVEL are according to
(defun org-ql--def-query-string-to-sexp-fn (predicates)
"Define function `org-ql--query-string-to-sexp' according to PREDICATES.
Builds the PEG expression using PREDICATES (which should be the
value of `org-ql-predicates')."
Builds the PEG expression using PREDICATES (which should be the
value of `org-ql-predicates')."
(let* ((names (--map (symbol-name (plist-get (cdr it) :name))
predicates))
(aliases (->> predicates
@ -726,8 +726,7 @@ Arguments STRING, POS, FILL, and LEVEL are according to
;; have to borrow some code. It ends up that we only have to
;; borrow this `with-peg-rules' call, which isn't too bad.
(eval `(with-peg-rules ,pexs
(peg-run (peg ,(caar pexs)) #'peg-signal-failure)))
)))
(peg-run (peg ,(caar pexs)) #'peg-signal-failure))))))
(pcase parsed-sexp
(`(,one-predicate) one-predicate)
(`(,_ . ,_) (cons boolean (reverse parsed-sexp)))