[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60270: 29.0.60; c-ts-mode: Comments are not indented right on auto
From: |
Yuan Fu |
Subject: |
bug#60270: 29.0.60; c-ts-mode: Comments are not indented right on auto indentation |
Date: |
Sat, 24 Dec 2022 14:32:20 -0800 |
Mohammed Sadiq <sadiq@sadiqpk.org> writes:
> On 2022-12-24 14:03, Yuan Fu wrote:
>> Mohammed Sadiq <sadiq@sadiqpk.org> writes:
>>
>>> In c-ts-mode, comments are indented wrong. Say for example, if a C
>>> source file contains the following content:
>>> /**
>>> * @some_func:
>>> * @arg1:
>>> */
>>> and if I select all and indent with C-x h TAB, I get the following:
>>> /**
>>> * @some_func:
>>> * @arg1:
>>> */
>>> But I expect to get the following:
>>> /**
>>> * @some_func:
>>> * @arg1:
>>> */
>> Should be fixed now, please give it a try :-)
>> Yuan
>
>
> Yes, it does work now, thanks.
>
> Can this be more in par with c-mode. Not strictly required, but would
> be nice to have if someone used to use c-mode and migrated to c-ts-mode
> and indented the code with select all and TAB (to avoid unnecessary
> change).
>
> The test cases are:
>
> /*
> some comment
> */
>
> /*
> * Some comment
> */
I didn’t quite get it, what’s the expected behavior you are looking for?
The two example indents like the following right now:
/*
some comment
*/
/*
* Some comment
*/
Yuan