From: Eli Zaretskii Date: Mon, 20 Jan 2025 12:39:20 +0000 (+0200) Subject: ; Fix last change X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e834aabe3e7dbd7c9c32c25cb4f891206c0a5ca0;p=emacs.git ; Fix last change * src/treesit.c (Ftreesit_parser_create): Fix comment wording. * doc/lispref/parsing.texi (Using Parser): Fix wording and markup. (cherry picked from commit ad51b3b3911bcca1dba5a5b3e5581465d2277d64) --- diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi index 8f1ee614ff2..034c424105b 100644 --- a/doc/lispref/parsing.texi +++ b/doc/lispref/parsing.texi @@ -571,7 +571,7 @@ in the alist, creating a parser for @var{language-a} actually creates a parser for @var{language-b}. By extension, anything that creates a node or makes a query of @var{language-a} will be redirected to use @var{language-b} instead. This mapping is completely transparent, the -parser created will report as @var{language-b}, and the sames goes for +created parser will reported to use @var{language-b}, and the same goes for nodes created by this parser. Specifically, the parser created by @code{treesit-parser-create} will @@ -583,10 +583,10 @@ if language @code{cpp} is mapped to @code{cuda}: (setq treesit-language-remap-alist '((cpp . cuda))) (treesit-parser-language (treesit-parser-create 'cpp)) -;; => 'cpp + @result{} 'cpp (treesit-parser-language (treesit-parser-create 'cuda)) -;; => 'cuda + @result{} 'cuda @end group @end example diff --git a/src/treesit.c b/src/treesit.c index f179e4561cf..d4090b949ea 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -1688,9 +1688,9 @@ an indirect buffer. */) ts_parser_set_language (parser, lang); /* Create parser. Use the unmapped LANGUAGE symbol, so the nodes - created by this parser (and this parser) self identify as the - unmapped language. This makes the grammar mapping completely - transparent. */ + created by this parser (and the parser itself) identify themselves + as the unmapped language. This makes the grammar mapping + completely transparent. */ Lisp_Object lisp_parser = make_treesit_parser (buf_orig, parser, NULL, language, tag);