GNU bug report logs -
#60983
29.0.60; Tree-sitter user-level control
Previous Next
Full log
View this message in rfc822 format
> From: Theodor Thornhill <theo <at> thornhill.no>
> Cc: casouri <at> gmail.com, bug-gnu-emacs <at> gnu.org
> Date: Wed, 25 Jan 2023 21:12:53 +0100
>
> > Adding Stefan in case he has some advice.
>
> Ok, I added a patch below.
>
>
> try:
>
> 1. open some c buffer and make some edits, for example
> ```
> void
> main()
> {
> if (x)
> {
> }
> }
> ```
>
> This should be the expected output when using the gnu style.
>
> 2. M-x c-ts-mode-set-style "bsd" RET
>
> 3. C-h o c-ts-mode-indent-style RET
> Observe variable has changed, but indenting the code does not.
>
> 4 C-h o treesit-simple-indent-rules RET
> Observe variable keeps old value
>
> 5. C-x x g
>
> Now the bsd style takes effect, and the treesit-simple-indent-rules
> variable has changed.
>
> I'm sure the fix is easy, but I don't see it. I purposely kept the
> functions simple until I know what approach is best:)
Thanks, I'll wait until you adapt the changes to Stefan's comments,
and try the new code then. If that doesn't fix the above problem, ask
the question again at that time.
This bug report was last modified 2 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.