diff options
| author | Daniel MartÃn | 2023-02-19 22:57:54 +0100 |
|---|---|---|
| committer | Theodor Thornhill | 2023-02-20 15:07:56 +0100 |
| commit | d7010d64b216b3adf7dd5adcc9bb62c7208b8d43 (patch) | |
| tree | fce712fdcd3cf702aa3ffff8388eca91f4f7d1bf /test | |
| parent | 19480aa30e37c760b608c39aff67f28792a1ce94 (diff) | |
| download | emacs-d7010d64b216b3adf7dd5adcc9bb62c7208b8d43.tar.gz emacs-d7010d64b216b3adf7dd5adcc9bb62c7208b8d43.zip | |
Add declaration_list to c-ts-common-indent-type-regexp-alist
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Consider a
"declaration_list" a block. (Bug#61635)
* test/lisp/progmodes/c-ts-mode-resources/indent.erts (Code): Add a
test case.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/c-ts-mode-resources/indent.erts | 16 |
1 files changed, 16 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 09c8ebcec44..36d7af4faf1 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts | |||
| @@ -369,3 +369,19 @@ int main() | |||
| 369 | }; | 369 | }; |
| 370 | } | 370 | } |
| 371 | =-=-= | 371 | =-=-= |
| 372 | |||
| 373 | Code: | ||
| 374 | (lambda () | ||
| 375 | (c++-ts-mode) | ||
| 376 | (setq-local indent-tabs-mode nil) | ||
| 377 | (setq-local c-ts-mode-indent-offset 2) | ||
| 378 | (indent-region (point-min) (point-max))) | ||
| 379 | |||
| 380 | Name: Declaration List (Namespace) (Bug#61635) | ||
| 381 | |||
| 382 | =-= | ||
| 383 | namespace test { | ||
| 384 | class Name { | ||
| 385 | }; | ||
| 386 | } | ||
| 387 | =-=-= | ||