Files
emacs/test/lisp/progmodes/csharp-ts-mode-resources/indent.erts
Jacob Leeming 494dfd9cf2 Fix indentation of if/else in 'csharp-ts-mode' (bug#70345)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules):
Fix indentation rules for 'if' and 'else'.

* test/lisp/progmodes/csharp-ts-mode-tests.el:
* test/lisp/progmodes/csharp-ts-mode-resources/indent.erts: New
test files.

Copyright-paperwork-exempt: yes
2024-04-25 18:53:06 +03:00

52 lines
404 B
Plaintext

Code:
(lambda ()
(csharp-ts-mode)
(indent-region (point-min) (point-max)))
Point-Char: |
Name: Indent single statement body for if/else. (bug#70345)
=-=
int x;
int y;
if (true)
x = 2;
if (true)
{
x = 2;
}
if (true)
x = 2;
else
y = 2;
if (true)
{
x = 2;
}
else
{
y = 2;
}
if (true)
x = 2;
else
{
y = 2;
}
if (true)
{
x = 2;
}
else
y = 2;
=-=-=