GNU bug report logs - #62951
29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: dmitry <at> gutov.dev, 62951 <at> debbugs.gnu.org
Subject: bug#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE
Date: Thu, 27 Apr 2023 18:03:28 +0300
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Wed, 26 Apr 2023 20:14:45 -0700
> Cc: Eli Zaretskii <eliz <at> gnu.org>,
>  62951 <at> 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.

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
  . FOR_EACH_LIVE_BUFFER (data.c, line 1430) is not recognized?
  . FOR_EACH_FRAME (keyboard.c, line 1256) is not recognized?

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).

Thanks!




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.