[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are co
From: |
Eli Zaretskii |
Subject: |
bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments |
Date: |
Fri, 24 Nov 2023 16:46:32 +0200 |
> From: Noah Peart <noah.v.peart@gmail.com>
> Date: Fri, 24 Nov 2023 06:35:06 -0800
> Cc: dmitry@gutov.dev, casouri@gmail.com, 67357@debbugs.gnu.org
>
> To reproduce the indentation bugs for unbracketed `else_clause`, and
> do-while:
> 1. open a buffer and insert the following:
>
> int main() {
> if (true)
> puts("Hello");
> else
> puts("No matched rule!"); // 1
> do
> puts("Hello");
> while (indented_as_part_of_block); // 2
> }
>
> 2. call `M-x example-setup` to configure `c-ts-mode`
> 3. `M-x indent-region` to indent the whole buffer
> You should see that the line with comment `1` has not been
> indented, and the line with comment `2` has been indented to the
> same level as the previous line.
>
> To reproduce the indentation bugs when comments are the first
> siblings:
> 1. open a buffer and insert:
>
> int main() {
> while (true) { /* foo */
> if (true) { // 1
> puts ("Hello"); // 2
> }
> }
> }
>
> 2. call `M-x example-setup` to configure `c-ts-mode`
> 3. `M-x indent-region` to indent the whole buffer
>
> You should see that the lines with comments `1` and `2` have
> not been indented at all.
Thanks, I see the problems now.
Let's wait for Yuan to chime in.
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Noah Peart, 2023/11/21
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Eli Zaretskii, 2023/11/23
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Dmitry Gutov, 2023/11/23
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Eli Zaretskii, 2023/11/23
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Dmitry Gutov, 2023/11/23
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Noah Peart, 2023/11/24
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Eli Zaretskii, 2023/11/24
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Noah Peart, 2023/11/24
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Noah Peart, 2023/11/24
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments,
Eli Zaretskii <=
- bug#67357: [PATCH] Fix c-ts-mode block indent when first-siblings are comments, Eli Zaretskii, 2023/11/29