From 629f222ba2abf5a149c381e27c89e88963f7466d Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Thu, 27 Oct 2022 21:21:45 -0700 Subject: [PATCH] Reflect tree-sitter indent rule presets change in manual * doc/lispref/modes.texi (Parser-based Indentation): String equivalence checks are changed to regexp matching. --- doc/lispref/modes.texi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index d73c443b4c2..f5872524224 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -4830,13 +4830,13 @@ an empty line or inside a multi-line string, etc. This matcher is a function of one argument, @var{type}; it returns a function that is called with 3 arguments: @var{node}, @var{parent}, and @var{bol}, and returns non-@code{nil} (i.e., a match) if -@var{parent}'s type is @var{type}. +@var{parent}'s type matches regexp @var{type}. @item node-is This matcher is a function of one argument, @var{type}; it returns a function that is called with 3 arguments: @var{node}, @var{parent}, -and @var{bol}, and returns non-@code{nil} if @var{node}'s type is -@var{type}. +and @var{bol}, and returns non-@code{nil} if @var{node}'s type matches +regexp @var{type}. @item query This matcher is a function of one argument, @var{query}; it returns a @@ -4849,13 +4849,13 @@ This matcher is a function of 5 arguments: @var{node-type}, @var{parent-type}, @var{node-field}, @var{node-index-min}, and @var{node-index-max}). It returns a function that is called with 3 arguments: @var{node}, @var{parent}, and @var{bol}, and returns -non-@code{nil} if @var{node}'s type is @var{node-type}, @var{parent}'s -type is @var{parent-type}, @var{node}'s field name in @var{parent} is -@var{node-field}, and @var{node}'s index among its siblings is between -@var{node-index-min} and @var{node-index-max}. If the value of an -argument is @code{nil}, this matcher doesn't check that argument. -For example, to match the first child where parent is -@code{argument_list}, use +non-@code{nil} if @var{node}'s type matches regexp @var{node-type}, +@var{parent}'s type matches regexp @var{parent-type}, @var{node}'s +field name in @var{parent} matches regexp @var{node-field}, and +@var{node}'s index among its siblings is between @var{node-index-min} +and @var{node-index-max}. If the value of an argument is @code{nil}, +this matcher doesn't check that argument. For example, to match the +first child where parent is @code{argument_list}, use @example (match nil "argument_list" nil nil 0 0) -- 2.39.2