GNU bug report logs - #61893
29.0.60; Indentation in c-ts-mode broken again

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Wed, 1 Mar 2023 14:38:01 UTC

Severity: normal

Found in version 29.0.60

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Daniel Martín <mardani29 <at> yahoo.es>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61893 <at> debbugs.gnu.org, Theodor Thornhill <theo <at> thornhill.no>,
 casouri <at> gmail.com
Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again
Date: Wed, 01 Mar 2023 18:13:37 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Wed, 01 Mar 2023 17:35:55 +0100
>> From: Theodor Thornhill <theo <at> thornhill.no>
>> CC: Yuan Fu <casouri <at> gmail.com>
>> 
>> 
>> 
>> On 1 March 2023 15:37:43 CET, Eli Zaretskii <eliz <at> gnu.org> 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 <casouri <at> gmail.com>
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(-)




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

Previous Next


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