emacs-diffs
[Top][All Lists]
Advanced

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

master 6b387d2edd1 6/7: ; Update Ftreesit_parser_list docstring.


From: Yuan Fu
Subject: master 6b387d2edd1 6/7: ; Update Ftreesit_parser_list docstring.
Date: Wed, 6 Sep 2023 00:03:50 -0400 (EDT)

branch: master
commit 6b387d2edd1cdbc7d617cc6aad19914d9b1de661
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    ; Update Ftreesit_parser_list docstring.
    
    * doc/lispref/parsing.texi (Using Parser): Update manual.
    * src/treesit.c (Ftreesit_parser_list): Update docstring.
---
 doc/lispref/parsing.texi | 3 ++-
 src/treesit.c            | 7 +++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index 20d4b09ed4c..a0479050f27 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -462,7 +462,8 @@ buffers use their base buffer's parsers.
 
 If @var{language} is non-@var{nil}, only include parsers for that
 language. And only include parsers with @var{tag}.  @var{tag} defaults
-to @code{nil}.
+to @code{nil}.  If @var{tag} is @code{t}, include parsers in the
+returned list regardless of their tag.
 @end defun
 
 @defun treesit-parser-delete parser
diff --git a/src/treesit.c b/src/treesit.c
index dfd098e3c85..f40bd32f156 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -1475,8 +1475,6 @@ See `treesit-parser-list' for the buffer's parser list.  
*/)
   return Qnil;
 }
 
-/* If TAG is t, include all parsers regardless of their tag.  But
-   don't document this until there's some actual need for it.  */
 DEFUN ("treesit-parser-list",
        Ftreesit_parser_list, Streesit_parser_list,
        0, 3, 0,
@@ -1488,8 +1486,9 @@ use their base buffer's parsers.
 
 If LANGUAGE is non-nil, only return parsers for that language.
 
-The returned list only contain parsers with TAG.  TAG defaults to
-nil.  */)
+The returned list only contain parsers with TAG.  TAG defaults to nil.
+If TAG is t, include parsers in the returned list regardless of their
+tag.  */)
   (Lisp_Object buffer, Lisp_Object language, Lisp_Object tag)
 {
   struct buffer *buf;



reply via email to

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