Function: combobulate-query-builder-matcher-query
combobulate-query-builder-matcher-query is a natively compiled
function defined in combobulate-query.el.
Signature
(combobulate-query-builder-matcher-query MATCH-NODE MATCH-TEXT STRICT-MATCH FACE &rest PARENT-MATCH-NODES)
Documentation
Build a nested query for MATCH-NODE matching MATCH-TEXT and set with FACE.
STRICT-MATCH is a boolean indicating whether any parent match nodes should be wildcard nodes or not.
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-query.el
(defun combobulate-query-builder-matcher-query (match-node match-text strict-match face
&rest parent-match-nodes)
"Build a nested query for MATCH-NODE matching MATCH-TEXT and set with FACE.
STRICT-MATCH is a boolean indicating whether any parent match
nodes should be wildcard nodes or not."
;; Construct the (optionally nested) query for the match node.
;; The general format is:
;;
;; (parent_n
;; (parent_n-1
;; ( ...
;; (parent_1
;; (match-node) @match-group-name
;; (#match "some-str" @match-group-name))))
(let* ((query (combobulate-build-nested-query
(cons match-node
(if strict-match parent-match-nodes
(make-list (length parent-match-nodes) '_)))
(combobulate-query-builder-capture-group-fn
'@combobulate-match match-text (length parent-match-nodes))))
(fixed-query (combobulate-query-builder-expand-match-face
(combobulate-query-builder-to-string query)
`(("combobulate-match" . ',face)))))
fixed-query))