From: Juri Linkov
This function finds the number of children of node. If named is non-nil, it only counts named child (see named node).
user-emacs-directory
(see The
In each of these directories, Emacs looks for a file with file-name
-extensions specified by the variable treesit-load-suffixes
.
+extensions specified by the variable dynamic-library-suffixes
.
If Emacs cannot find the library or has problems loading it, Emacs
signals the treesit-load-language-error
error. The data of
diff --git a/admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html b/admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html
index 670f235bd20..a3fe6622162 100644
--- a/admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html
+++ b/admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html
@@ -134,7 +134,7 @@ example:
tree-sitter query in either the string, s-expression or compiled form.
For each query, the :keyword/value pairs that
-precede it add meta information to it. The :lang
keyword
+precede it add meta information to it. The :language
keyword
declares query’s language. The :feature
keyword sets the
feature name of query. Users can control which features are
enabled with font-lock-maximum-decoration
and
diff --git a/admin/notes/tree-sitter/html-manual/Retrieving-Node.html b/admin/notes/tree-sitter/html-manual/Retrieving-Node.html
index 58e87e8df7f..16eeb0b1091 100644
--- a/admin/notes/tree-sitter/html-manual/Retrieving-Node.html
+++ b/admin/notes/tree-sitter/html-manual/Retrieving-Node.html
@@ -201,13 +201,13 @@ is the string text.
This function finds the next sibling of node. If named is
non-nil
, it finds the next named sibling.
This function finds the previous sibling of node. If
named is non-nil
, it finds the previous named sibling.
This function finds the child of node whose field name is field-name, a string.
;; Get the child that has "body" as its field name. -(treesit-child-by-field-name node "body") +(treesit-node-child-by-field-name node "body") ⇒ #<treesit-node (compound_statement) in 45-89>
declarator
node and a body
node.
This function finds the first child of node that extends beyond
buffer position pos. “Extends beyond” means the end of the
child node is greater or equal to pos. This function only looks
diff --git a/admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html b/admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html
index 0c827b3e755..1d992b828ea 100644
--- a/admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html
+++ b/admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html
@@ -142,12 +142,12 @@ ts_node_named_child treesit-node-child
ts_node_named_child_count treesit-node-child-count
ts_node_child_by_field_name treesit-node-by-field-name
ts_node_child_by_field_id
-ts_node_next_sibling treesit-next-sibling
-ts_node_prev_sibling treesit-prev-sibling
-ts_node_next_named_sibling treesit-next-sibling
-ts_node_prev_named_sibling treesit-prev-sibling
-ts_node_first_child_for_byte treesit-first-child-for-pos
-ts_node_first_named_child_for_byte treesit-first-child-for-pos
+ts_node_next_sibling treesit-node-next-sibling
+ts_node_prev_sibling treesit-node-prev-sibling
+ts_node_next_named_sibling treesit-node-next-sibling
+ts_node_prev_named_sibling treesit-node-prev-sibling
+ts_node_first_child_for_byte treesit-node-first-child-for-pos
+ts_node_first_named_child_for_byte treesit-node-first-child-for-pos
ts_node_descendant_for_byte_range treesit-descendant-for-range
ts_node_descendant_for_point_range
ts_node_named_descendant_for_byte_range treesit-descendant-for-range
diff --git a/admin/notes/tree-sitter/starter-guide b/admin/notes/tree-sitter/starter-guide
index a6a4c647f23..606f7891dfa 100644
--- a/admin/notes/tree-sitter/starter-guide
+++ b/admin/notes/tree-sitter/starter-guide
@@ -238,7 +238,7 @@ Concretely, something like this:
...
(cond
;; Tree-sitter.
- ((treesit-ready-p 'python-mode 'python)
+ ((treesit-ready-p 'python)
(treesit-parser-create 'python)
(setq-local treesit-font-lock-settings python--treesit-settings)
(setq-local treesit-font-lock-feature-list
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index dffd6653369..b2dd294ea28 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -4054,7 +4054,7 @@ tree-sitter query in either the string, s-expression or compiled form.
@c FIXME: Cross-ref treesit-font-lock-level to user manual.
For each @var{query}, the @var{:keyword}/@var{value} pairs that
-precede it add meta information to it. The @code{:lang} keyword
+precede it add meta information to it. The @code{:language} keyword
declares @var{query}'s language. The @code{:feature} keyword sets the
feature name of @var{query}. Users can control which features are
enabled with @code{treesit-font-lock-level} and
diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index 19a22c121de..9635427f940 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -65,7 +65,6 @@ For example, the C language grammar is represented as the symbol
@vindex treesit-extra-load-path
@vindex treesit-load-language-error
-@vindex treesit-load-suffixes
Tree-sitter language grammar are distributed as dynamic libraries.
In order to use a language grammar in Emacs, you need to make sure
that the dynamic library is installed on the system. Emacs looks for
@@ -83,7 +82,7 @@ and finally, in the system's default locations for dynamic libraries.
@end itemize
In each of these directories, Emacs looks for a file with file-name
-extensions specified by the variable @code{treesit-load-suffixes}.
+extensions specified by the variable @code{dynamic-library-suffixes}.
If Emacs cannot find the library or has problems loading it, Emacs
signals the @code{treesit-load-language-error} error. The data of
@@ -677,12 +676,12 @@ This function returns all of @var{node}'s children as a list. If
@var{named} is non-@code{nil}, it retrieves only named nodes.
@end defun
-@defun treesit-next-sibling node &optional named
+@defun treesit-node-next-sibling node &optional named
This function finds the next sibling of @var{node}. If @var{named} is
non-@code{nil}, it finds the next named sibling.
@end defun
-@defun treesit-prev-sibling node &optional named
+@defun treesit-node-prev-sibling node &optional named
This function finds the previous sibling of @var{node}. If
@var{named} is non-@code{nil}, it finds the previous named sibling.
@end defun
@@ -696,14 +695,14 @@ assign @dfn{field names} to child nodes (@pxref{tree-sitter node field
name, field name}). For example, a @code{function_definition} node
could have a @code{declarator} node and a @code{body} node.
-@defun treesit-child-by-field-name node field-name
+@defun treesit-node-child-by-field-name node field-name
This function finds the child of @var{node} whose field name is
@var{field-name}, a string.
@example
@group
;; Get the child that has "body" as its field name.
-(treesit-child-by-field-name node "body")
+(treesit-node-child-by-field-name node "body")
@result{} #