unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63957@debbugs.gnu.org, Theodor Thornhill <theo@thornhill.no>
Subject: bug#63957: 29.0.91; c-ts-mode: incorrect fontification in alloc.c
Date: Fri, 9 Jun 2023 23:51:46 -0700	[thread overview]
Message-ID: <D02103A4-E5CE-43A2-812C-09E552ABA4D2@gmail.com> (raw)
In-Reply-To: <D93D42C7-2829-4876-9733-45E711AD4D9A@gmail.com>



> On Jun 8, 2023, at 12:19 AM, Yuan Fu <casouri@gmail.com> wrote:
> 
> 
> 
>> On Jun 7, 2023, at 11:00 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>>> Date: Thu, 08 Jun 2023 08:56:51 +0300
>>> From: Eli Zaretskii <eliz@gnu.org>
>>> 
>>> 
>>> To reproduce:
>>> 
>>> 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.

Yuan




  reply	other threads:[~2023-06-10  6:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08  5:56 bug#63957: 29.0.91; c-ts-mode: incorrect fontification in alloc.c Eli Zaretskii
2023-06-08  6:00 ` Eli Zaretskii
2023-06-08  7:19   ` Yuan Fu
2023-06-10  6:51     ` Yuan Fu [this message]
2023-06-10  8:11       ` Eli Zaretskii
2023-06-12  9:16         ` Yuan Fu
2023-06-12 12:38           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D02103A4-E5CE-43A2-812C-09E552ABA4D2@gmail.com \
    --to=casouri@gmail.com \
    --cc=63957@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=theo@thornhill.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).