diff options
| author | Yuan Fu | 2023-02-05 15:20:52 -0800 |
|---|---|---|
| committer | Yuan Fu | 2023-02-06 18:28:39 -0800 |
| commit | d68ff6016d0ca011b5bf0fd05578fe1abb2e53a9 (patch) | |
| tree | 7b2fb360b0f2cbcb01631e03a907f5962c0ef81a /test | |
| parent | 2ac8c4bbd6f47751a68b0230310f6fddd7da8de5 (diff) | |
| download | emacs-d68ff6016d0ca011b5bf0fd05578fe1abb2e53a9.tar.gz emacs-d68ff6016d0ca011b5bf0fd05578fe1abb2e53a9.zip | |
Fix c-ts-mode indentation (bug#61291)
Fix indentation for the semicolon in
while (str_a[i++] == str_b[j++])
;
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New rule.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/c-ts-mode-resources/indent.erts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 6f64e1e7953..2750526f893 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts | |||
| @@ -144,6 +144,17 @@ int f2(int x, | |||
| 144 | }; | 144 | }; |
| 145 | =-=-= | 145 | =-=-= |
| 146 | 146 | ||
| 147 | Name: Semi-colon in While Loop (bug#61291) | ||
| 148 | |||
| 149 | =-= | ||
| 150 | while (true) | ||
| 151 | ; | ||
| 152 | for (int i = 0; | ||
| 153 | i < 5; | ||
| 154 | i++) | ||
| 155 | ; | ||
| 156 | =-=-= | ||
| 157 | |||
| 147 | Name: Multiline Block Comments 1 (bug#60270) | 158 | Name: Multiline Block Comments 1 (bug#60270) |
| 148 | 159 | ||
| 149 | =-= | 160 | =-= |