GNU bug report logs -
#67007
29.1.90; treesit-simple-indent-presets example on match
Previous Next
Reported by: Maxim Kim <habamax <at> gmail.com>
Date: Thu, 9 Nov 2023 02:59:02 UTC
Severity: normal
Found in version 29.1.90
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 67007-done <at> debbugs.gnu.org (full text, mbox):
> On Nov 8, 2023, at 6:40 PM, Maxim Kim <habamax <at> 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
This bug report was last modified 1 year and 231 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.