emacs-diffs
[Top][All Lists]
Advanced

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

master a79c300a88b: ; Fix recently-updated documentation


From: Eli Zaretskii
Subject: master a79c300a88b: ; Fix recently-updated documentation
Date: Mon, 2 Dec 2024 07:11:44 -0500 (EST)

branch: master
commit a79c300a88b195572e57c79fa5b23cdf0e3460d5
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Fix recently-updated documentation
    
    * doc/lispref/modes.texi (Parser-based Indentation): Fix markup,
    typos and wording.
---
 doc/lispref/modes.texi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index f32d5a89bca..ed7cc141cd5 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -5245,11 +5245,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
@@ -5280,14 +5281,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



reply via email to

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