all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: sadiq@sadiqpk.org
Cc: 60270@debbugs.gnu.org
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	[thread overview]
Message-ID: <B9CBE2B7-7E52-4844-A645-C69176A3682C@gmail.com> (raw)
In-Reply-To: <d719de37212bbfa8286ab0c5c6d59a2c@sadiqpk.org>


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





  parent reply	other threads:[~2022-12-24 22:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  9:30 bug#60270: 29.0.60; c-ts-mode: Comments are not indented right on auto indentation Mohammed Sadiq
2022-12-24  8:33 ` Yuan Fu
2022-12-24  9:49   ` Mohammed Sadiq
2022-12-24 22:32 ` Yuan Fu [this message]
2022-12-25  4:34   ` Mohammed Sadiq
2022-12-25  8:36 ` Yuan Fu
2022-12-25  9:25   ` Eli Zaretskii
2023-01-03 14:30     ` Mohammed Sadiq
2022-12-25  9:46   ` Mohammed Sadiq
2023-01-07 23:28 ` Yuan Fu
2023-01-08 10:02   ` Mohammed Sadiq
2023-01-10  5:28 ` Yuan Fu
2023-01-10 10:13   ` Mohammed Sadiq
2023-01-10 12:17     ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-11  9:27       ` Yuan Fu
2023-01-11  9:30     ` Yuan Fu
2023-01-13  8:58       ` Yuan Fu
2023-01-14  7:53 ` Yuan Fu
2023-01-15  5:28   ` Mohammed Sadiq
2023-01-16  8:24 ` Yuan Fu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B9CBE2B7-7E52-4844-A645-C69176A3682C@gmail.com \
    --to=casouri@gmail.com \
    --cc=60270@debbugs.gnu.org \
    --cc=sadiq@sadiqpk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.