;; int[5] a = { 0, 0, 0, 0 };
((match nil "initializer_list" nil 1 1) parent-bol c-ts-mode-indent-offset)
- ((match nil "initializer_list" nil 2) c-ts-mode--anchor-prev-sibling 0)
+ ((parent-is "initializer_list") c-ts-mode--anchor-prev-sibling 0)
;; Statement in enum.
((match nil "enumerator_list" nil 1 1) standalone-parent c-ts-mode-indent-offset)
- ((match nil "enumerator_list" nil 2) c-ts-mode--anchor-prev-sibling 0)
+ ((parent-is "enumerator_list") c-ts-mode--anchor-prev-sibling 0)
;; Statement in struct and union.
((match nil "field_declaration_list" nil 1 1) standalone-parent c-ts-mode-indent-offset)
- ((match nil "field_declaration_list" nil 2) c-ts-mode--anchor-prev-sibling 0)
+ ((parent-is "field_declaration_list") c-ts-mode--anchor-prev-sibling 0)
;; Statement in {} blocks.
((match nil "compound_statement" nil 1 1) standalone-parent c-ts-mode-indent-offset)
- ((match nil "compound_statement" nil 2) c-ts-mode--anchor-prev-sibling 0)
+ ((parent-is "compound_statement") c-ts-mode--anchor-prev-sibling 0)
;; Opening bracket.
((node-is "compound_statement") standalone-parent c-ts-mode-indent-offset)
;; Bug#61291.
}
=-=-=
-Name: Empty Line
-=-=
-int main()
-{
- |
-}
-=-=-=
-
Name: Concecutive blocks (GNU Style) (bug#60873)
=-=
};
}
=-=-=
+
+Code:
+ (lambda ()
+ (c-ts-mode)
+ (setq-local indent-tabs-mode nil)
+ (setq-local c-ts-mode-indent-offset 2)
+ (c-ts-mode-set-style 'gnu)
+ (indent-for-tab-command))
+
+Name: Empty Line
+=-=
+int main()
+{
+ |
+}
+=-=-=
+
+Name: Empty Line Previous Sibling
+=-=
+int main()
+{
+ int a = 1;
+ |
+}
+=-=-=