diff options
| author | Yuan Fu | 2023-01-11 01:26:21 -0800 |
|---|---|---|
| committer | Yuan Fu | 2023-01-12 17:11:37 -0800 |
| commit | 8f446c2d39736d752829e37100eede3f484b827e (patch) | |
| tree | a575be5c30c0ab6aeaf2606b7bdc45a38414bc73 | |
| parent | 083badc9c122a802080552e7771e78ee47c01e3c (diff) | |
| download | emacs-8f446c2d39736d752829e37100eede3f484b827e.tar.gz emacs-8f446c2d39736d752829e37100eede3f484b827e.zip | |
Fix c-ts-mode comment indentation (bug#60270)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Move the
star rule up.
| -rw-r--r-- | lisp/progmodes/c-ts-mode.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 5c7df4b2141..e53ed390ba1 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el | |||
| @@ -122,11 +122,13 @@ MODE is either `c' or `cpp'." | |||
| 122 | ((node-is "else") parent-bol 0) | 122 | ((node-is "else") parent-bol 0) |
| 123 | ((node-is "case") parent-bol 0) | 123 | ((node-is "case") parent-bol 0) |
| 124 | ((node-is "preproc_arg") no-indent) | 124 | ((node-is "preproc_arg") no-indent) |
| 125 | ;; `c-ts-mode--looking-at-star' has to come before | ||
| 126 | ;; `c-ts-mode--comment-2nd-line-matcher'. | ||
| 127 | ((and (parent-is "comment") c-ts-mode--looking-at-star) | ||
| 128 | c-ts-mode--comment-start-after-first-star -1) | ||
| 125 | (c-ts-mode--comment-2nd-line-matcher | 129 | (c-ts-mode--comment-2nd-line-matcher |
| 126 | c-ts-mode--comment-2nd-line-anchor | 130 | c-ts-mode--comment-2nd-line-anchor |
| 127 | 1) | 131 | 1) |
| 128 | ((and (parent-is "comment") c-ts-mode--looking-at-star) | ||
| 129 | c-ts-mode--comment-start-after-first-star -1) | ||
| 130 | ((parent-is "comment") prev-adaptive-prefix 0) | 132 | ((parent-is "comment") prev-adaptive-prefix 0) |
| 131 | (c-ts-mode--top-level-label-matcher point-min 1) | 133 | (c-ts-mode--top-level-label-matcher point-min 1) |
| 132 | ((node-is "labeled_statement") parent-bol 0) | 134 | ((node-is "labeled_statement") parent-bol 0) |