unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Maxim Kim <habamax@gmail.com>
Cc: 67007-done@debbugs.gnu.org
Subject: bug#67007: 29.1.90; treesit-simple-indent-presets example on match
Date: Wed, 8 Nov 2023 23:50:01 -0800	[thread overview]
Message-ID: <BD12314F-5B8A-4517-99AF-27D34F7C1B23@gmail.com> (raw)
In-Reply-To: <87h6lvr6ne.fsf@gmail.com>



> On Nov 8, 2023, at 6:40 PM, Maxim Kim <habamax@gmail.com> wrote:
> 
> 
> While trying to play with treesit indent rules I came across
> `treesit-simple-indent-presets' where I believe example given is wrong:
> 
> C-x o treesit-simple-indent-presets RET
> ----
> (match NODE-TYPE PARENT-TYPE NODE-FIELD NODE-INDEX-MIN NODE-INDEX-MAX)
> 
>    NODE-TYPE checks for NODE’s type, PARENT-TYPE checks for
>    PARENT’s type, NODE-FIELD checks for the field name of NODE
>    in PARENT, NODE-INDEX-MIN and NODE-INDEX-MAX check for
>    NODE’s index in PARENT.  Therefore, to match the first child
>    where PARENT is "argument_list", use
> 
>        (match nil "argument_list" nil nil 0 0).
> ----
> 
> (match NODE-TYPE PARENT-TYPE     NODE-FIELD NODE-INDEX-MIN NODE-INDEX-MAX)
> (match nil       "argument_list" nil        nil            0               0).
> 
> 5 args in signature vs 6 in example.

Good catch. I fixed it on emacs-29. Thank you!

Yuan




      reply	other threads:[~2023-11-09  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09  2:40 bug#67007: 29.1.90; treesit-simple-indent-presets example on match Maxim Kim
2023-11-09  7:50 ` Yuan Fu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BD12314F-5B8A-4517-99AF-27D34F7C1B23@gmail.com \
    --to=casouri@gmail.com \
    --cc=67007-done@debbugs.gnu.org \
    --cc=habamax@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).