GNU bug report logs - #63957
29.0.91; c-ts-mode: incorrect fontification in alloc.c

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Thu, 8 Jun 2023 05:57:01 UTC

Severity: normal

Found in version 29.0.91

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 63957 <at> debbugs.gnu.org, theo <at> thornhill.no
Subject: bug#63957: 29.0.91; c-ts-mode: incorrect fontification in alloc.c
Date: Sat, 10 Jun 2023 11:11:24 +0300
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Fri, 9 Jun 2023 23:51:46 -0700
> Cc: Theodor Thornhill <theo <at> thornhill.no>,
>  63957 <at> debbugs.gnu.org
> 
> >>> emacs -Q
> >>> C-x C-f src/alloc.c RET
> >>> M-x c-ts-mode RET
> >>> C-u 3184 M-g g
> >>> 
> >>> Observe that several "else if" clauses in the following fragment are not
> >>> fontified correctly:
> >> 
> >> Adding the relevant folks.
> >> 
> >> Could you guys please look into this issue?
> 
> Ok, so this is one of such cases where the preproc directives severs the code and the parser can’t recover very well. We can cover it over by just fontifying “else if” with keyword face, but there are a million ways for the preproc directive to mess up the parser, I don’t think we can cover every case.

Can you explain what is special in this particular case that is
different from other preprocessor directives?  I'd like to think if
this case is important enough to try harder.

Thanks.




This bug report was last modified 2 years and 7 days ago.

Previous Next


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