GNU bug report logs - #58873
29.0.50; Fix indent-line-function in tree-sitter

Previous Next

Package: emacs;

Reported by: Theodor Thornhill <theo <at> thornhill.no>

Date: Sat, 29 Oct 2022 19:12:02 UTC

Severity: normal

Found in version 29.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 58873 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 58873 <at> debbugs.gnu.org
Subject: Re: bug#58873: 29.0.50; Fix indent-line-function in tree-sitter
Date: Sat, 29 Oct 2022 13:06:55 -0700

> On Oct 29, 2022, at 12:11 PM, Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
> 
> 
> Hi Yuan!
> 
> There were some regressions with the new indent-line-function - see
> attached patch.  We need the point, not the indentation, and the
> save-excursion is actually needed.
> 
> consider:
> 
> ```
> foo({
>  thing: 1,
>                tho|ng: 2, // <--- point is |
> })
> ```
> 
> if you indent now you want to end up like this:
> 
> ```
> foo({
>  thing: 1,
>  tho|ng: 2, // <--- point is |
> })
> ```
> 
> or if 
> 
> ```
> foo({
>  thing: 1,
> |thong: 2, // <--- point is |
> })
> ```
> You want to end up like this:
> 
> ```
> foo({
>  thing: 1,
>  |thong: 2, // <--- point is |
> })
> ```
> 
> This patch addresses this :-)
> 
> In addition there was a bug where the parent-bol didn't indent
> correctly, this should also be fixed now.
> 
> Thanks again, Yuan!

I applied your change (manually), thanks!

Yuan



This bug report was last modified 2 years and 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.