GNU bug report logs -
#73778
30.0.91; cpp-ts-mode indentation never finishes
Previous Next
Full log
View this message in rfc822 format
Le 19/10/2024 à 10:12, Eli Zaretskii a écrit :
>> 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 <at> 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.
It seems it was indeed solved by commit
c154047c46ae833a114e84d72e62269d12c3249d, thanks!
I don't know how to close this bug report, though.
This bug report was last modified 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.