[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#73778: 30.0.91; cpp-ts-mode indentation never finishes
From: |
Eli Zaretskii |
Subject: |
bug#73778: 30.0.91; cpp-ts-mode indentation never finishes |
Date: |
Sat, 19 Oct 2024 11:12:35 +0300 |
> Date: Sat, 12 Oct 2024 21:20:47 +0200
> From: Augustin Chéneau (BTuin) via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> In c++-ts-mode, there is a bug when I indent a line with <tab>.
>
> This is trivially reproducible with the below code:
>
> int func() {
> int a;
> int b;
> }
>
> Place your point before "int b;", press <tab>, and the indentation
> process never finishes.
>
> This is caused by an error in c-ts-mode--anchor-prev-sibling, as the
> condition of the last "or" in the function has incorrect
> delimitation. Which means that the "if" will run the second test on
> success, which then cause the function to be stuck in an infinite loop.
>
> I would gladly send you a patch, but I've been stuck in the legal limbo
> of the copyright assignment for months now and I cannot contribute to
> GNU Emacs (or any GNU project for the matter).
>
> I hope my description will be enough.
I cannot reproduce this on the latest emacs-30 branch, perhaps because
changes were installed in the function you mention two days after you
have built your Emacs. Can you try the latest emacs-30 branch and see
if the problem still persists?
Thanks.