diff options
| author | Dmitry Gutov | 2023-04-10 02:58:46 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2023-04-10 02:58:46 +0300 |
| commit | db8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e (patch) | |
| tree | 49cb24a387626ba9d8592d999933700317517607 /test | |
| parent | 589959fb09d8a8f60179e1cceca4c3777b8c7719 (diff) | |
| download | emacs-db8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e.tar.gz emacs-db8f207e52fc969e0dcf30e197bcfaa4fa1d2b6e.zip | |
Fix some cases of incomplete code's indentation [c/c++-ts-mode]
* lisp/progmodes/c-ts-mode.el (c-ts-base--before-indent): Try to
guess when the parse tree is incomplete, and provide a better node
to indent against (bug#62717).
(c-ts-base-mode): Set up advice for local treesit-indent-function.
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 5cdefe2122c..221b3d809af 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts | |||
| @@ -464,3 +464,17 @@ main (void) | |||
| 464 | | | 464 | | |
| 465 | } | 465 | } |
| 466 | =-=-= | 466 | =-=-= |
| 467 | |||
| 468 | Name: Empty Line (Block Start) | ||
| 469 | |||
| 470 | =-= | ||
| 471 | int | ||
| 472 | main (void) | ||
| 473 | { | ||
| 474 | | | ||
| 475 | =-= | ||
| 476 | int | ||
| 477 | main (void) | ||
| 478 | { | ||
| 479 | | | ||
| 480 | =-=-= | ||