all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Knut Anders Hatlen <kahatlen@gmail.com>
To: Yuan Fu <casouri@gmail.com>
Cc: Theodor Thornhill <theo@thornhill.no>, 60398@debbugs.gnu.org
Subject: bug#60398: 29.0.60; c++-ts-mode: Strange indentation of function body when parameter list has newline
Date: Thu, 29 Dec 2022 12:33:40 +0100	[thread overview]
Message-ID: <87bknmxx4b.fsf@gmail.com> (raw)
In-Reply-To: <118C936E-3A09-43E4-8FDA-E1755EE8F48F@gmail.com> (Yuan Fu's message of "Thu, 29 Dec 2022 01:06:23 -0800")

Yuan Fu <casouri@gmail.com> writes:

>> On Dec 28, 2022, at 11:49 PM, Knut Anders Hatlen <kahatlen@gmail.com> wrote:
>> 
>> 
>> Function bodies are indented strangely in c++-ts-mode if the parameter
>> list has a newline between two parameters. For example:
>> 
>> int f1(int x, int y) {
>>  // Indented as expected.
>>  return x + y;
>> }
>> 
>> int f2(int x,
>>       int y) {
>> 	 // Indented too much.
>> 	 return x + y;
>>       };
>
> I implemented a fix in 784e509bded, Theo, WDYT? Could this be used on other C-like modes, too?
>
> Yuan

It seems to behave as expected now. Thanks for the quick fix!

-- 
Knut Anders





      parent reply	other threads:[~2022-12-29 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29  7:49 bug#60398: 29.0.60; c++-ts-mode: Strange indentation of function body when parameter list has newline Knut Anders Hatlen
2022-12-29  9:06 ` Yuan Fu
2022-12-29 10:45   ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-29 11:33   ` Knut Anders Hatlen [this message]

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=87bknmxx4b.fsf@gmail.com \
    --to=kahatlen@gmail.com \
    --cc=60398@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=theo@thornhill.no \
    /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.