[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_T
From: |
Yuan Fu |
Subject: |
bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE |
Date: |
Thu, 27 Apr 2023 12:56:07 -0700 |
> On Apr 27, 2023, at 8:03 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Wed, 26 Apr 2023 20:14:45 -0700
>> Cc: Eli Zaretskii <eliz@gnu.org>,
>> 62951@debbugs.gnu.org
>>
>> Ok, here’s the patch. Eli, would you give it a try?
>
> It signals an error when I enable c-ts-mode:
>
> 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.
>
> 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.
> . FOR_EACH_LIVE_BUFFER (data.c, line 1430) is not recognized?
> . FOR_EACH_FRAME (keyboard.c, line 1256) is not recognized?
Didn’t know that they exited :-) Now I have FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE,
FOR_EACH_ALIST_VALUE, FOR_EACH_LIVE_BUFFER, FOR_EACH_FRAME.
>
> This is much better than before already, so I think you should install
> this on the emacs-29 branch, once you fix the above problems (assuming
> they are easily fixable).
Cool, I pushed the change.
Yuan
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Eli Zaretskii, 2023/04/19
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Yuan Fu, 2023/04/21
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Eli Zaretskii, 2023/04/22
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Dmitry Gutov, 2023/04/23
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Yuan Fu, 2023/04/26
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Yuan Fu, 2023/04/26
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Eli Zaretskii, 2023/04/27
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE,
Yuan Fu <=
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Eli Zaretskii, 2023/04/28
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Yuan Fu, 2023/04/29
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Eli Zaretskii, 2023/04/30
- bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE, Dmitry Gutov, 2023/04/27