GNU bug report logs - #61541
30.0.50; Wrong indentarion in csharp-mode

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Wed, 15 Feb 2023 21:20:01 UTC

Severity: normal

Found in version 30.0.50

Done: stefankangas <at> gmail.com

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Theodor Thornhill <theo <at> thornhill.no>
To: Ergus <spacibba <at> aol.com>
Cc: jostein <at> kjonigsen.net, 61541 <at> debbugs.gnu.org
Subject: bug#61541: 30.0.50; Wrong indentarion in csharp-mode
Date: Fri, 17 Feb 2023 20:28:07 +0100
Ergus <spacibba <at> aol.com> writes:

> Hi:
>
> I just found that this indentations are wrong in csharp mode:
>
> // wrong
> new myNamespace.myClass
> {
>     Name1 = x.Value, // defun-block-intro
> 	var2 = 2     // statement-cont
> 	}            // statement-cont
>
>
> The problem seems to be related with the dot (.) in the new, because
> this variant indents correctly:
>
> // right
> new myClass
> {
>     Name1 = x.Value,   // brace-list-intro
>     var2 = 2           // brace-list-entry
> }                      // brace-list-close
>
>
> csharp-ts-mode is doing it right BTW.
>

Hi!

Yeah, this is one of the harder issues iirc, and one of the ones that
made us move to tree-sitter in csharp-mode in the first place.

What do you think Jostein?

Patches welcome!

Theo





This bug report was last modified 1 year and 263 days ago.

Previous Next


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