From 5858921f409f6ee9d2e08dbdcd1719969a4f5544 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 9 Nov 2022 15:35:51 +0200 Subject: [PATCH] ; Minor improvements in wording of tree-sitter docs * doc/lispref/parsing.texi (Multiple Languages): * doc/lispref/modes.texi (Parser-based Font Lock): Improve wording. --- doc/lispref/modes.texi | 20 ++++++++++---------- doc/lispref/parsing.texi | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index da190b0b02e..973d183a729 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -3951,17 +3951,17 @@ example: @end example This function takes a series of @var{query-spec}s, where each -@var{query-spec} is a @var{query} preceded by multiple pairs of -@var{:keyword} and @var{value}. Each @var{query} is a tree-sitter -query in either the string, s-expression or compiled form. - -For each @var{query}, the @var{:keyword} and @var{value} pairs add -meta information to it. The @code{:lang} keyword declares -@var{query}'s language. The @code{:feature} keyword sets the feature -name of @var{query}. Users can control which features are enabled -with @code{font-lock-maximum-decoration} and +@var{query-spec} is a @var{query} preceded by one or more +@var{:keyword}/@var{value} pairs. Each @var{query} is a +tree-sitter query in either the string, s-expression or compiled form. + +For each @var{query}, the @var{:keyword}/@var{value} pairs that +precede it add meta information to it. The @code{:lang} keyword +declares @var{query}'s language. The @code{:feature} keyword sets the +feature name of @var{query}. Users can control which features are +enabled with @code{font-lock-maximum-decoration} and @code{treesit-font-lock-feature-list} (described below). These two -keywords are mandated. +keywords are mandatory. Other keywords are optional: diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi index cae83f8d5cc..0a0104b4be0 100644 --- a/doc/lispref/parsing.texi +++ b/doc/lispref/parsing.texi @@ -1537,12 +1537,12 @@ takes care of compiling queries and other post-processing, and outputs a value that @var{treesit-range-settings} can have. It takes a series of @var{query-spec}s, where each @var{query-spec} is -a @var{query} preceded by zero or more pairs of @var{keyword} and -@var{value}. Each @var{query} is a tree-sitter query in either the +a @var{query} preceded by zero or more @var{keyword}/@var{value} +pairs. Each @var{query} is a tree-sitter query in either the string, s-expression or compiled form, or a function. If @var{query} is a tree-sitter query, it should be preceeded by two -@var{:keyword} @var{value} pairs, where the @code{:embed} keyword +@var{:keyword}/@var{value} pairs, where the @code{:embed} keyword specifies the embedded language, and the @code{:host} keyword specified the host language. -- 2.39.5