all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Knut Anders Hatlen <kahatlen@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 01:06:23 -0800	[thread overview]
Message-ID: <118C936E-3A09-43E4-8FDA-E1755EE8F48F@gmail.com> (raw)
In-Reply-To: <87y1qqd4zw.fsf@oracle.com>



> 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




  reply	other threads:[~2022-12-29  9:06 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 [this message]
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

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=118C936E-3A09-43E4-8FDA-E1755EE8F48F@gmail.com \
    --to=casouri@gmail.com \
    --cc=60398@debbugs.gnu.org \
    --cc=kahatlen@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.