bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#67007: 29.1.90; treesit-simple-indent-presets example on match


From: Yuan Fu
Subject: bug#67007: 29.1.90; treesit-simple-indent-presets example on match
Date: Wed, 8 Nov 2023 23:50:01 -0800


> 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 via email to

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