GNU bug report logs - #67417
29.1.50; c-ts-mode syntax issues with no brackets

Previous Next

Package: emacs;

Reported by: Arteen Abrishami <arteen <at> linux.ucla.edu>

Date: Thu, 23 Nov 2023 22:00:03 UTC

Severity: normal

Found in version 29.1.50

Fixed in version 29.2

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


Message #40 received at 67417-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Yuan Fu <casouri <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 67417-done <at> debbugs.gnu.org, arteen <at> linux.ucla.edu
Subject: Re: bug#67417: 29.1.50; c-ts-mode syntax issues with no brackets
Date: Mon, 11 Dec 2023 02:29:47 +0200
Version: 29.2

On 10/12/2023 11:29, Yuan Fu wrote:
> 
> 
> On 12/9/23 12:27 AM, Eli Zaretskii wrote:
>>> Date: Thu, 30 Nov 2023 23:58:14 -0800
>>> Cc: 67417 <at> debbugs.gnu.org
>>> From: Yuan Fu <casouri <at> gmail.com>
>>>
>>>> The rest of the nodes (if/while/do/for) don't result in parse errors
>>>> here, as long as the condition in parentheses is typed out correctly.
>>>>
>>>> I tried some additional clauses looking for "previous sibling",
>>>> checking whether it's for_statement, etc, which ends with "expression
>>>> statement", and that one is empty... but it a fair amount of code
>>>> which will likely miss other edge cases anyway. Or breaks when the
>>>> grammar changes.
>>> Yeah, for now we can match for the specific case where there's an else
>>> before a "}". That should reduce the chance of it matching other edge
>>> cases. I'll give it another look on this weekend.
>> Any progress here?
> I pushed a commit that changes the too-board heuristic to only match 
> "else before closing bracket". Hopefully this won't cause any false 
> matches.
> 
> I think we can close this. Dmitry, WDYT?

LGTM! (And closing.)

Arteen, let us know if you see any problems with the fixes that are now 
in the emacs-29 branch.




This bug report was last modified 1 year and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.