diff options
| author | Yuan Fu | 2023-02-05 17:05:21 -0800 |
|---|---|---|
| committer | Yuan Fu | 2023-02-06 18:28:40 -0800 |
| commit | 7cb92b5398771b088450942d9eaefd53b5f91cf6 (patch) | |
| tree | cf429b602cf1080232d83e364fc234c715455784 /test | |
| parent | d68ff6016d0ca011b5bf0fd05578fe1abb2e53a9 (diff) | |
| download | emacs-7cb92b5398771b088450942d9eaefd53b5f91cf6.tar.gz emacs-7cb92b5398771b088450942d9eaefd53b5f91cf6.zip | |
Fix c-ts-mode indentation
Turns out I shouldn't have removed the explicit rules. Anyway, now it
indents properly.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add rules.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add tests
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/c-ts-mode-resources/indent.erts | 14 |
1 files changed, 14 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 2750526f893..8c588f56f9a 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts | |||
| @@ -155,6 +155,20 @@ for (int i = 0; | |||
| 155 | ; | 155 | ; |
| 156 | =-=-= | 156 | =-=-= |
| 157 | 157 | ||
| 158 | Name: Bracketless Simple Statement | ||
| 159 | |||
| 160 | =-= | ||
| 161 | for (int i = 0; i < 5; i++) | ||
| 162 | continue; | ||
| 163 | |||
| 164 | while (true) | ||
| 165 | return 1; | ||
| 166 | |||
| 167 | do | ||
| 168 | i++; | ||
| 169 | while (true) | ||
| 170 | =-=-= | ||
| 171 | |||
| 158 | Name: Multiline Block Comments 1 (bug#60270) | 172 | Name: Multiline Block Comments 1 (bug#60270) |
| 159 | 173 | ||
| 160 | =-= | 174 | =-= |