Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again

From: Daniel Martín <[email-masked]>
Date: Wed, 01 Mar 2023 18:13:37 +0100

Eli Zaretskii <[email-masked]> writes:

>> Date: Wed, 01 Mar 2023 17:35:55 +0100
>> From: Theodor Thornhill <[email-masked]>
>> CC: Yuan Fu <[email-masked]>
>> 
>> 
>> 
>> On 1 March 2023 15:37:43 CET, Eli Zaretskii <[email-masked]> wrote:
>> >Indentation in c-ts-mode on today's emacs-29 branch is in muc worse
>> >shape than it was a few days ago.
>> >
>> >To reproduce:
>> >
>> >  emacs -Q
>> >  C-x C-f src/dispnew.c RET
>> >  M-x c-ts-mode RET
>> >
>> 
>> 
>> Not sure, don't believe I've touched it last couple of days. I can take a look this evening!
>
> Thanks.  It's always possible that it behaved like that back then,
> although I'm almost sure it didn't.

A git bisect pointed to this commit, in case that helps:

commit 4a25fa4586c9d419ca96441120f4b9189e13ae1c
Author: Yuan Fu <[email-masked]>
Date:   Fri Feb 24 18:40:52 2023 -0800
    Align to prev sibling for c-ts-mode indentation
    
    As requested by a discussion on emacs-devel.
    
    * lisp/progmodes/c-ts-mode.el:
    (c-ts-mode--anchor-prev-sibling): New function.
    (c-ts-mode--indent-styles): Indent first child as before, indent the
    rest to their previous sibling.  Remove bracketless statement rules
    that I forgot to remove previously.
 lisp/progmodes/c-ts-mode.el | 46 ++++++++++++++++++++++++++++++++++-----------
 1 file changed, 35 insertions(+), 11 deletions(-)