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: Eli Zaretskii
Subject: bug#64018: 29.0.91; Improve tree-sitter docs
Date: Mon, 12 Jun 2023 18:09:27 +0300

> 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.





reply via email to

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