mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 15:56:35 -04:00
Fix c-ts-mode bsd-style indentation of union bodies (bug#81255)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules): Add "union_specifier" to the parent-is regexp. * test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts: New test.
This commit is contained in:
parent
9d1b0c2d7f
commit
c0a33a474d
|
|
@ -501,6 +501,7 @@ MODE can be `c' or `cpp'. STYLE can be `gnu', `k&r', `linux', `bsd'."
|
|||
((parent-is ,(rx (or "function_definition"
|
||||
"struct_specifier"
|
||||
"enum_specifier"
|
||||
"union_specifier"
|
||||
"function_declarator"
|
||||
"template_declaration")))
|
||||
standalone-parent 0)
|
||||
|
|
|
|||
|
|
@ -125,3 +125,12 @@ if (true)
|
|||
else
|
||||
break;
|
||||
=-=-=
|
||||
|
||||
Name: Union (bug#81255)
|
||||
|
||||
=-=
|
||||
union u
|
||||
{
|
||||
int i;
|
||||
};
|
||||
=-=-=
|
||||
|
|
|
|||
Loading…
Reference in a new issue