bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#64018: 29.0.91; Improve tree-sitter docs


From: Yuan Fu
Subject: bug#64018: 29.0.91; Improve tree-sitter docs
Date: Tue, 13 Jun 2023 02:17:21 -0700


> On Jun 12, 2023, at 8:09 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Cc: Yuan Fu <casouri@gmail.com>
>> Date: Mon, 12 Jun 2023 15:15:41 +0100
>> From:  Basil Contovounesios via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> 
>> While reading through the excellent tree-sitter documentation I
>> collected some potential improvements against emacs-29, either for
>> typos, to clarify wording, or fix up some probable errors like duplicate
>> instances of treesit-defun-type-regexp and parent-bol.
>> 
>> WDYT?
> 
> Thanks for this proofreading.  Everything LGTM, with a couple of minor
> exceptions:
> 
>> This function raises the @code{treesit-query-error} error if
>> -@var{query} is malformed.  The signal data contains a description of
>> +@var{query} is malformed.  The signal data contain a description of
> 
> I think "data contains" looks better.  In general, "data" is used as
> singular in this and other similar cases.  (There are other such
> changes in the patch, which I'd rather drop.)
> 
>> It takes a series of @var{query-spec}s, where each @var{query-spec} is
>> -a @var{query} preceded by zero or more @var{keyword}/@var{value}
>> +a @var{query} preceded by zero or more @var{:keyword}/@var{value}
>                                          ^^^^^^^^^^^^^^
> This should be @code{:@var{keyword}} instead.  That is, the colon is
> not part of the meta-syntactic variable, it is a literal character.
> 
>> For example, @code{python-mode} sets this variable to a regexp that
>> -matches either @code{"function_definition"} or @code{"class_definition"}.
>> +matches either @code{function_definition} or @code{class_definition}.
> 
> It is better to use @samp here, not @code.  That way, you get the
> quotes in the printed output.

Thanks a bunch! I don’t have anything to add.

Yuan




reply via email to

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