[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64018: 29.0.91; Improve tree-sitter docs
From: |
Basil Contovounesios |
Subject: |
bug#64018: 29.0.91; Improve tree-sitter docs |
Date: |
Tue, 13 Jun 2023 13:32:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii [2023-06-12 11:09 -0400] 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>
>>
>> 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.)
Done.
>> 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.
I can agree with that, but the result looks a bit jarring to me:
Particularly when juxtaposed with the associated @var{value} which gets
a different font. Should I make the change regardless?
FWIW, there are several existing places that use @var{:keyword} or
similar.
>> 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.
Done.
Thanks,
--
Basil