Function: combobulate-query-builder-to-string
combobulate-query-builder-to-string is a natively compiled function
defined in combobulate-query.el.
Signature
(combobulate-query-builder-to-string FORM-QUERY)
Documentation
Convert FORM-QUERY to a string query.
Rewrites :match to #match, etc. along the way.
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-query.el
(defun combobulate-query-builder-to-string (form-query)
"Convert FORM-QUERY to a string query.
Rewrites `:match' to `#match', etc. along the way."
(let ((tgt-query (if (stringp form-query) form-query
(pp-to-string form-query))))
(pcase-dolist (`(,before . ,after)
;; `.' is the anchor in the real query language,
;; but `:anchor' in elisp forms.
`((":anchor" . ".")
;; Fix up `:match' to `#match', etc.
(,(rx ":" (group (| "match" "pred" "eq"))) . "#\\1")))
(setq tgt-query (replace-regexp-in-string before after tgt-query)))
(string-trim tgt-query)))