;; Indent the body of namespace definitions.
((parent-is "declaration_list") parent-bol c-ts-mode-indent-offset)))
+ ;; Closing bracket. This should be before initializer_list
+ ;; (and probably others) rule because that rule (and other
+ ;; similar rules) will match the closing bracket. (Bug#61398)
+ ((node-is "}") point-min c-ts-common-statement-offset)
+
;; int[5] a = { 0, 0, 0, 0 };
((parent-is "initializer_list") parent-bol c-ts-mode-indent-offset)
;; Statement in enum.
;; Statement in {} blocks.
((parent-is "compound_statement") point-min c-ts-common-statement-offset)
- ;; Closing bracket.
- ((node-is "}") point-min c-ts-common-statement-offset)
;; Opening bracket.
((node-is "compound_statement") point-min c-ts-common-statement-offset)
;; Bug#61291.
(setq-local c-ts-common-indent-type-regexp-alist
`((block . ,(rx (or "compound_statement"
"field_declaration_list"
- "enumerator_list")))
+ "enumerator_list"
+ "initializer_list"
+ "field_declaration_list")))
(if . "if_statement")
(else . ("if_statement" . "alternative"))
(do . "do_statement")
return 3;
=-=-=
+Name: Initializer List (Bug#61398)
+
+=-=
+int main()
+{
+ const char *emoticons[][2] =
+ {
+ {":-)", "SLIGHTLY SMILING FACE"},
+ {";-)", "WINKING FACE"},
+ {":-(", "SLIGHTLY FROWNING FACE"},
+ };
+}
+=-=-=
+
Name: Multiline Block Comments 1 (bug#60270)
=-=
}
}
=-=-=
+
+Name: Initializer List (Linux Style) (Bug#61398)
+
+=-=
+int main()
+{
+ const char *emoticons[][2] = {
+ {":-)", "SLIGHTLY SMILING FACE"},
+ {";-)", "WINKING FACE"},
+ {":-(", "SLIGHTLY FROWNING FACE"},
+ };
+}
+=-=-=