@defun treesit-search-subtree node predicate &optional all backward limit
This function traverses the subtree of @var{node} (including
@var{node}), and match @var{predicate} with each node along the way.
-And @var{predicate} is a regexp that matches against each node's type,
-or a function that takes a node and returns nil/non-nil. If a node
-matches, that node is returned, if no node ever matches, nil is
-returned.
+And @var{predicate} is a regexp that matches (case-insensitively)
+against each node's type, or a function that takes a node and returns
+nil/non-nil. If a node matches, that node is returned, if no node
+ever matches, nil is returned.
By default, this function only traverses named nodes, if @var{all} is
non-nil, it traverses all nodes. If @var{backward} is non-nil, it
This function is somewhat similar to @code{treesit-search-subtree}.
It also traverse the parse tree and match each node with
@var{predicate} (except for @var{start}), where @var{predicate} can be
-a regexp or a function. For a tree like the below where @var{start}
-is marked 1, this function traverses as numbered:
+a (case-insensitive) regexp or a function. For a tree like the below
+where @var{start} is marked 1, this function traverses as numbered:
@example
@group
Basically, it takes the subtree under @var{root}, and combs it so only
the nodes that match @var{predicate} are left, like picking out grapes
on the vine. Like previous functions, @var{predicate} can be a regexp
-string that matches against each node's type, or a function that takes
-a node and return nil/non-nil.
+string that matches against each node's type case-insensitively, or a
+function that takes a node and return nil/non-nil.
For example, for a subtree on the left that consist of both numbers
and letters, if @var{predicate} is ``letter only'', the returned tree
Stops at the first node after point that matches PREDICATE.
PREDICATE can be either a regexp that matches against each node's
-type, or a function that takes a node and returns nil/non-nil for
-match/no match.
+type case-insensitively, or a function that takes a node and
+returns nil/non-nil for match/no match.
If a node matches, move to that node and return the node,
otherwise return nil. SIDE controls whether we move to the start
Traverse the subtree of NODE, and match PREDICATE with each node along
the way. PREDICATE is a regexp string that matches against each
-node's type, or a function that takes a node and returns nil/non-nil.
+node's type case-insensitively, or a function that takes a node and
+returns nil/non-nil.
By default, only traverse named nodes, if ALL is non-nil, traverse all
nodes. If BACKWARD is non-nil, traverse backwards. If LIMIT is
Start traversing the tree from node START, and match PREDICATE with
each node along the way (except START). PREDICATE is a regexp string
-that matches against each node's type, or a function that takes a node
-and returns nil/non-nil.
+that matches against each node's type case-insensitively, or a
+function that takes a node and returns nil/non-nil.
By default, only search for named nodes, if ALL is non-nil, search for
all nodes. If BACKWARD is non-nil, search backwards.
Basically, take the subtree under ROOT, and comb it so only the nodes
that match PREDICATE are left, like picking out grapes on the vine.
-PREDICATE is a regexp string that matches against each node's type.
+PREDICATE is a regexp string that matches against each node's type
+case-insensitively.
For a subtree on the left that consist of both numbers and letters, if
PREDICATE is "is letter", the returned tree is the one on the right.