Fix c-ts-mode indentation (bug#75442)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules):
Use standalone-parent instead of parent.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts:
New test.
This commit is contained in:
Yuan Fu 2025-01-12 22:23:36 -08:00
parent 7d3bc1ff2f
commit 04032cd00a
No known key found for this signature in database
GPG key ID: 56E19BC57664A442
2 changed files with 11 additions and 1 deletions

View file

@ -474,7 +474,7 @@ MODE can be `c' or `cpp'. STYLE can be `gnu', `k&r', `linux', `bsd'."
"enum_specifier"
"function_declarator"
"template_declaration")))
parent 0)
standalone-parent 0)
;; This is for the trailing-star stype: int *
;; func()
((match "function_declarator" nil "declarator") parent-bol 0)

View file

@ -149,6 +149,16 @@ fn()
};
=-=-=
Name: typedef with struct definition (bug#75442)
=-=
typedef struct Point
{
int x;
int y;
} Point;
=-=-=
Name: Multiline Parameter List (bug#60398)
=-=