]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add some tree-sitter thing content to the manual
authorYuan Fu <casouri@gmail.com>
Mon, 16 Dec 2024 05:40:49 +0000 (21:40 -0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:01:28 +0000 (16:01 +0100)
* doc/lispref/parsing.texi (User-defined Things): List "builtin"
things.

(cherry picked from commit 10f976300d03a8cb9a12a5d2548d1b275ac3edcc)

doc/lispref/parsing.texi

index 7fbb8e61ce1ff22bbb5d820a82e67af9f2f47e42..7f21c3864fcb641e1d8ccc8ceeba4ba8673096b1 100644 (file)
@@ -1610,6 +1610,16 @@ Note that this example is modified for didactic purposes, and isn't
 exactly how C and C@t{++} modes define things.
 @end defvar
 
+Emacs builtin functions already make use some thing definitions.
+Command @code{treesit-forward-sexp} uses the @code{sexp} definition if
+major mode defines it; @code{treesit-forward-sentence} uses the
+@code{sentence} definition.  Defun movement functions like
+@code{treesit-end-of-defun} uses the @code{defun} definition
+(@code{defun} definition is overridden by
+@var{treesit-defun-type-regexp} for backward compatibility).  Major
+modes can also define @code{comment}, @code{string}, @code{text}
+(generally comments and strings).
+
 The rest of this section lists a few functions that take advantage of
 the thing definitions.  Besides the functions below, some other
 functions listed elsewhere also utilize the thing feature, e.g.,