emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/tree-sitter 11379ef236 3/5: Remove treesit manual entries for de


From: Yuan Fu
Subject: feature/tree-sitter 11379ef236 3/5: Remove treesit manual entries for deleted functions
Date: Mon, 29 Aug 2022 14:43:27 -0400 (EDT)

branch: feature/tree-sitter
commit 11379ef2369c09c719fecc66cf3b1287d9ad1f3a
Author: Yuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>
Commit: Yuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>

    Remove treesit manual entries for deleted functions
    
    * doc/lispref/parsing.texi: Remove documentation for
    treesit-get-parser-create and treesit-get-parser.
---
 doc/lispref/parsing.texi | 36 ++++++++----------------------------
 1 file changed, 8 insertions(+), 28 deletions(-)

diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index 27755e0caa..8df14b12b7 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -348,34 +348,14 @@ this function and determine whether to activate 
tree-sitter features.
 
 
 @cindex Creating tree-sitter parsers
-To create a parser, we provide a buffer to parse and the language to
-use (@pxref{Language Definitions}).  Emacs provides several creation
-functions for different use cases.
-
-@defun treesit-get-parser-create language
-This function is the most convenient one.  It gives you a parser that
-recognizes @var{language} for the current buffer.  The function
-checks if there already exists a parser suiting the need, and only
-creates a new one when it can't find one.
-
-@example
-@group
-;; Create a parser for C programming language.
-(treesit-get-parser-create 'c)
-    @c @result{} #<treesit-parser for c in *scratch*>
-@end group
-@end example
-@end defun
-
-@defun treesit-get-parser language
-This function is like @code{treesit-get-parser-create}, but it
-always creates a new parser.
-@end defun
-
-@defun treesit-parser-create buffer language
-This function is the most primitive, requiring both the buffer to
-associate to, and the language to use.  If @var{buffer} is nil, the
-current buffer is used.
+@defun treesit-parser-create language &optional buffer no-reuse
+To create a parser, we provide a @var{buffer} to keep track of and the
+@var{language} to use (@pxref{Language Definitions}).  If @var{buffer}
+is nil, the current buffer is used.
+
+By default, this function reuses a parser if one already exists for
+@var{language} in @var{buffer}, if @var{no-reuse} is non-nil, this
+function always creates a new parser.
 @end defun
 
 Given a parser, we can query information about it:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]