]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix recently-updated documentation
authorEli Zaretskii <eliz@gnu.org>
Mon, 2 Dec 2024 12:11:00 +0000 (14:11 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Dec 2024 17:04:50 +0000 (18:04 +0100)
* doc/lispref/modes.texi (Parser-based Indentation): Fix markup,
typos and wording.

(cherry picked from commit a79c300a88b195572e57c79fa5b23cdf0e3460d5)

doc/lispref/modes.texi

index 5ef3de665d94428839ab3b8e8c348c7ece8be80a..34dcf4cb10e7c48f22577870c4e9b4b388c78d9a 100644 (file)
@@ -5209,11 +5209,12 @@ more complex indentation engines.
 @defvar treesit-simple-indent-rules
 This local variable stores indentation rules for every language.  It is
 an list of elements of the form @w{@code{(@var{language}
-@var{rule}...)}}, where @var{language} is a language symbol, and each
+@var{rule}@dots{})}}, where @var{language} is a language symbol, and each
 @var{rule} is either a list with elements of the form
-@w{@code{(@var{matcher} @var{anchor} @var{offset})}}, or a function. Let
-'s focus on the list variant first, we'll come back to the function
-variant later.
+@w{@code{(@var{matcher} @var{anchor} @var{offset})}}, or a function.
+
+Here's the description of the list variant, followed by the function
+variant.
 
 First, Emacs passes the smallest tree-sitter node at the beginning of
 the current line to @var{matcher}; if it returns non-@code{nil}, this
@@ -5244,14 +5245,13 @@ or a function that returns an integer.  If it is a function, it is
 passed @var{node}, @var{parent}, and @var{bol}, like matchers and
 anchors.
 
-Remember that @var{rule} can also be a function.  This is for the
-complex cases where a rule needs to consider the matching rule and
-anchor together.  If @var{rule} is a function, it's passed the same
-argument as @var{matcher}: @var{node}, @var{parent}, and @var{bol}.  If
-it matches, @var{rule} should return a cons @w{@code{(@var{anchor-pos}
-. @var{offset})}}, where @var{anchor-pos} is a buffer position, and
-@var{offset} is the indent offset.  If @var{rule} does't match, it
-should return @code{nil}.
+If @var{rule}is a function, it is useful for the complex cases where a
+rule needs to consider the matching rule and the anchor together.  The
+@var{rule} function is passed the same argument as @var{matcher}:
+@var{node}, @var{parent}, and @var{bol}.  If it matches, @var{rule}
+should return a cons @w{@code{(@var{anchor-pos} . @var{offset})}}, where
+@var{anchor-pos} is a buffer position, and @var{offset} is the indent
+offset.  If @var{rule} doesn't match, it should return @code{nil}.
 @end defvar
 
 @defvar treesit-simple-indent-presets