From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63957: 29.0.91; c-ts-mode: incorrect fontification in alloc.c Date: Sat, 10 Jun 2023 11:11:24 +0300 Message-ID: <83zg57zqhf.fsf@gnu.org> References: <83mt1a33a4.fsf@gnu.org> <83legu333f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12217"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63957@debbugs.gnu.org, theo@thornhill.no To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 10 10:12:25 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7thw-0002xa-U4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Jun 2023 10:12:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7thg-0006VC-DW; Sat, 10 Jun 2023 04:12:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7tha-0006Un-RM for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7tha-0008AW-Gz for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7tha-0001CX-Bs for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jun 2023 08:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63957 X-GNU-PR-Package: emacs Original-Received: via spool by 63957-submit@debbugs.gnu.org id=B63957.16863846834562 (code B ref 63957); Sat, 10 Jun 2023 08:12:02 +0000 Original-Received: (at 63957) by debbugs.gnu.org; 10 Jun 2023 08:11:23 +0000 Original-Received: from localhost ([127.0.0.1]:33190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7tgx-0001BW-FA for submit@debbugs.gnu.org; Sat, 10 Jun 2023 04:11:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7tgv-0001BH-Nt for 63957@debbugs.gnu.org; Sat, 10 Jun 2023 04:11:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7tgp-000801-7y; Sat, 10 Jun 2023 04:11:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=3vXsN0S2rTAS5el0VxDobNYsqVAqJwLGD+f7ZZjArZM=; b=b/hQYNRM3+DlY6Ah14tK Pe1MFFkewTM7J1CDCSIfDAfyYwNDniy3XJxop/Di0wteJSLyMake8mdeyg+FZZURykGbVG8MHrSf/ rFvXV5Nm5Nd+a/U3LqkNfR5qfnkqRgGMDlu/ffu2n8DqkChSzKxzsHq6dWuHbtP56cxHPo07FkOc+ wTFyhA3L9xDsXPdept2Ut9wmHfF2UmqrUpfDkSak890TiIvXSDT+oQlN5zmO3CuZ/XETay8ZYgDPP t4J/cjnbXczsMci9IB8lwPS7QRAF0WyPJNzR97NLHjmG7uccSzwdYaF6ftKNQRxEqWDGRfAALjC/Y PowZtdRBYMut3g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7tgo-000891-OJ; Sat, 10 Jun 2023 04:11:15 -0400 In-Reply-To: (message from Yuan Fu on Fri, 9 Jun 2023 23:51:46 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263199 Archived-At: > From: Yuan Fu > Date: Fri, 9 Jun 2023 23:51:46 -0700 > Cc: Theodor Thornhill , > 63957@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.