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-region (point-min) (point-max))) Point-Char: | Name: Basic =-= int main (void) { return 0; } =-=-= Name: Hanging Braces (GNU Style) =-= int main (void) { if (true) { } } =-=-= Name: Labels (GNU Style) =-= int main (void) { label: return 0; if (true) { label: return 0; } else { if (true) { label: return 0; } } } =-=-= Name: For Loop with Multi-line Condition (GNU Style) =-= int main() { for (int i = 0; i < b; i++) { return 0; } } =-=-= Name: If-Else (GNU Style) =-= int main() { if (true) { return 0; } else { return 1; } } =-=-= Name: Empty Line =-= int main() { | } =-=-= Name: Concecutive blocks (GNU Style) (bug#60873) =-= int main (int argc, char *argv[]) { { int i = 0; } } =-=-= Name: Bracket-less Block-Statement (GNU Style) (bug#61026) =-= int main() { while (true) if (true) { puts ("Hello"); } for (int i=0; i<5; i++) if (true) { puts ("Hello"); } do if (true) { puts ("Hello"); } while (true); if (true) if (true) { puts ("Hello"); } } =-=-= Name: Multiline Parameter List (bug#60398) =-= int f2(int x, int y) { return x + y; }; =-=-= Name: Multiline Block Comments 1 (bug#60270) =-= /** * @some_func: * @arg1: */ =-=-= Name: Multiline Block Comments 2 (bug#60270) =-= /* some comment */ =-=-= Name: Multiline Block Comments 3 (bug#60270) =-= /* some comment */ =-=-= Name: Multiline Block Comments 4 (bug#60270) =-= /* * Some comment */ =-=-= Name: Multiline Block Comments 5 (bug#60270) =-= /* line one line 2 */ =-= /* line one line 2 */ =-=-= Code: (lambda () (c-ts-mode) (setq-local indent-tabs-mode nil) (setq-local c-ts-mode-indent-offset 8) (c-ts-mode-set-style 'linux) (indent-region (point-min) (point-max))) Name: Labels (Linux Style) =-=-= int main (void) { label: return 0; if (true) { label: return 0; } else { if (true) { label: return 0; } } } =-=-= Name: Bracket-less Block-Statement (Linux Style) (bug#61026) =-=-= int main() { while (true) if (true) { puts ("Hello"); } for (int i=0; i<5; i++) if (true) { puts ("Hello"); } do if (true) { puts ("Hello"); } while (true); if (true) if (true) { puts ("Hello"); } } =-=-= Name: Complicated mixed bracket matching indentation (bug#61142) =-= void foo( int foo) { for (;;) return 5; if (a == 0 && b == 1 && foo) { return 0; } else if (a == 1) { return 1; } else if (true) return 5; else { if (a == 0 && b == 1 && foo) for ( int i = 0; i < 5; i++) if (true) do i = 5; while (true); else if (false) { return 6; } else if (true && false) return 6; } } =-=-=