From 11379ef2369c09c719fecc66cf3b1287d9ad1f3a Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Fri, 19 Aug 2022 00:25:10 -0700 Subject: [PATCH] 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 27755e0caa5..8df14b12b73 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{} # -@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: -- 2.39.5