GNU bug report logs -
#62951
29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Wed, 19 Apr 2023 16:41:01 UTC
Severity: normal
Found in version 29.0.90
Fixed in version 29.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #44 received at 62951 <at> debbugs.gnu.org (full text, mbox):
> On Apr 27, 2023, at 10:41 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Yuan Fu <casouri <at> gmail.com>
>> Date: Thu, 27 Apr 2023 12:56:07 -0700
>> Cc: dmitry <at> gutov.dev,
>> 62951 <at> debbugs.gnu.org
>>
>>> c-ts-mode: Cannot load language definition: not-found, ("libtree-sitter-emacs-c" "libtree-sitter-emacs-c.dll"), "No such file or directory"
>>>
>>> It looks like your "fake emacs-c language" trick somehow misfires?
>>> The value of treesit-load-name-override-list is nil, which is not what
>>> you intended, AFAICT? The only way I can make this work is by
>>> manually customizing treesit-load-name-override-list before loading
>>> c-ts-mode.
>>
>> Duh, sorry, dumb mistake. Fixed.
>
> Thanks.
>
>>> Otherwise, looks quite good; here are some other problems I found:
>>>
>>> . some uses of FOR_EACH_TAIL are not fontified at all; examples:
>>> comp.c, line 2079, fns.c, line 189
>>
>> You mean the FOE_EACH_TAIL part isn’t fontified, or the body isn’t fontified? Because the body are always fontified here. FOR_EACH_TAIL itself shouldn’t be fontified since it’s just a macro call and a variable.
>
> I mean the macro itself, FOR_EACH_TAIL. If it isn't supposed to be
> fontified, then why is it fontified at line 856 of comp.c? It's
> inconsistent. (However, this is a very minor problem, so if fixing
> it is difficult, we can leave this alone for now.)
Ah, I see. FOR_EACH_TAIL’s that has a bracketed body are not skipped and still have fontification on them. I pushed a change so that no one has fontification now. Also thanks for the doc fix :-)
Yuan
This bug report was last modified 2 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.