diff options
author | Yuan Fu <casouri@gmail.com> | 2023-02-09 23:25:57 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2023-02-09 23:25:57 -0800 |
commit | f5789aefc2e245075b5cced402edb086fefb60ef (patch) | |
tree | 800f2dd6be3922f865d70c24f6fcebbb2ddd5d96 /doc/lispref/parsing.texi | |
parent | b39821fdcef5d094838a978d2b0ab1ebb44b7cb8 (diff) | |
download | emacs-f5789aefc2e245075b5cced402edb086fefb60ef.tar.gz emacs-f5789aefc2e245075b5cced402edb086fefb60ef.tar.bz2 emacs-f5789aefc2e245075b5cced402edb086fefb60ef.zip |
Rename LIMIT to DEPTH in tree-sitter functions (bug#61231)
I only changed the Lisp functions, internal functions are left
unchanged.
* doc/lispref/parsing.texi (Retrieving Nodes): Update manual.
* src/treesit.c (Ftreesit_search_subtree)
(Ftreesit_induce_sparse_tree): Change LIMIT to DEPTH.
Diffstat (limited to 'doc/lispref/parsing.texi')
-rw-r--r-- | doc/lispref/parsing.texi | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi index 53787d7e54d..b22b3eb25c3 100644 --- a/doc/lispref/parsing.texi +++ b/doc/lispref/parsing.texi @@ -734,7 +734,7 @@ is non-@code{nil}, it looks for smallest named child. @heading Searching for node -@defun treesit-search-subtree node predicate &optional backward all limit +@defun treesit-search-subtree node predicate &optional backward all depth This function traverses the subtree of @var{node} (including @var{node} itself), looking for a node for which @var{predicate} returns non-@code{nil}. @var{predicate} is a regexp that is matched @@ -745,9 +745,9 @@ the first node that matches, or @code{nil} if none does. By default, this function only traverses named nodes, but if @var{all} is non-@code{nil}, it traverses all the nodes. If @var{backward} is non-@code{nil}, it traverses backwards (i.e., it visits the last child -first when traversing down the tree). If @var{limit} is +first when traversing down the tree). If @var{depth} is non-@code{nil}, it must be a number that limits the tree traversal to -that many levels down the tree. If @var{limit} is @code{nil}, it +that many levels down the tree. If @var{depth} is @code{nil}, it defaults to 1000. @end defun @@ -805,7 +805,7 @@ Arguments @var{predicate}, @var{backward} and @var{all} are the same as in @code{treesit-search-forward}. @end defun -@defun treesit-induce-sparse-tree root predicate &optional process-fn limit +@defun treesit-induce-sparse-tree root predicate &optional process-fn depth This function creates a sparse tree from @var{root}'s subtree. It takes the subtree under @var{root}, and combs it so only the nodes @@ -836,8 +836,8 @@ b 1 2 b | | b c d If @var{process-fn} is non-@code{nil}, instead of returning the matched nodes, this function passes each node to @var{process-fn} and -uses the returned value instead. If non-@code{nil}, @var{limit} is -the number of levels to go down from @var{root}. If @var{limit} is +uses the returned value instead. If non-@code{nil}, @var{depth} is +the number of levels to go down from @var{root}. If @var{depth} is @code{nil}, it defaults to 1000. Each node in the returned tree looks like |