From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#35454: 26.2.50; CC-Mode fontification fails inside macro Date: Sat, 27 Apr 2019 20:36:46 +0000 Message-ID: <20190427203646.GA11087@ACM> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="252100"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 35454@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 27 22:45:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKUC8-0013SS-7o for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2019 22:45:12 +0200 Original-Received: from localhost ([127.0.0.1]:36122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKUC7-0004kL-7w for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2019 16:45:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKUBt-0004Sf-Cx for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 16:44:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKU4E-0006Um-S5 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 16:37:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50787) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hKU4E-0006TK-09 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 16:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hKU4D-0003Vz-Sa for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 16:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2019 20:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35454 X-GNU-PR-Package: emacs Original-Received: via spool by 35454-submit@debbugs.gnu.org id=B35454.155639741713501 (code B ref 35454); Sat, 27 Apr 2019 20:37:01 +0000 Original-Received: (at 35454) by debbugs.gnu.org; 27 Apr 2019 20:36:57 +0000 Original-Received: from localhost ([127.0.0.1]:36098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKU48-0003Vh-Qc for submit@debbugs.gnu.org; Sat, 27 Apr 2019 16:36:57 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:28509 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hKU46-0003VT-6D for 35454@debbugs.gnu.org; Sat, 27 Apr 2019 16:36:54 -0400 Original-Received: (qmail 57598 invoked by uid 3782); 27 Apr 2019 20:36:48 -0000 Original-Received: from acm.muc.de (p4FE15039.dip0.t-ipconnect.de [79.225.80.57]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 27 Apr 2019 22:36:47 +0200 Original-Received: (qmail 11159 invoked by uid 1000); 27 Apr 2019 20:36:46 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158375 Archived-At: Hello, Mauro. On Sat, Apr 27, 2019 at 12:57:05 -0300, Mauro Aranda wrote: > Hello. > Steps to reproduce: > 1) emacs -Q > 2) Open up a new .c file: > C-x C-f test.c > 3) Type this text: > #define FOO \ > /* Some comms. */ \ > struct foobar my_foo; \ > struct foobar my_bar; > The first struct foobar after the comment is not fontified as the second > one. That is, the second foobar has face font-lock-type-face, and > my_bar has face font-lock-variable-name-face, but the first foobar and > my_foo don't get those face values. > I actually bumped into this issue while visiting the emacs source file > src/editfns.c. In that file, search for "#define EXTRA_CONTEXT_FIELDS" > and the problem should be evident. Thanks! I can reproduce this easily, and will look into it in the next day or two. Of interest is the fact that if FOO is given an empty argument list (i.e. one writes #define FOO() \ ... ), the bug doesn't happen. > I can reproduce it with the latest Emacs 26, as well as with the latest > master: > Repository revision: 8dc00b2f1e6523c634df3e24379afbe712a32b27 > Repository branch: master > Best regards, > Mauro. [ .... ] -- Alan Mackenzie (Nuremberg, Germany).