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: Thu, 2 May 2019 21:03:12 +0000 Message-ID: <20190502210312.GC4277@ACM> References: <20190427203646.GA11087@ACM> <20190501210230.GA3999@ACM> 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="118616"; 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 Thu May 02 23:04:18 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 1hMIsL-000UgS-D6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 23:04:17 +0200 Original-Received: from localhost ([127.0.0.1]:58532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMIsK-0004uj-8f for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 17:04:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMIs8-0004tE-9L for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 17:04:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMIs6-0008EG-RX for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 17:04:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33594) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMIs6-0008Dv-N1; Thu, 02 May 2019 17:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMIs6-0008V0-CW; Thu, 02 May 2019 17:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Thu, 02 May 2019 21:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35454 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 35454-submit@debbugs.gnu.org id=B35454.155683099832620 (code B ref 35454); Thu, 02 May 2019 21:04:02 +0000 Original-Received: (at 35454) by debbugs.gnu.org; 2 May 2019 21:03:18 +0000 Original-Received: from localhost ([127.0.0.1]:47138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMIrO-0008U4-G0 for submit@debbugs.gnu.org; Thu, 02 May 2019 17:03:18 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:64845 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hMIrM-0008Tv-Ro for 35454@debbugs.gnu.org; Thu, 02 May 2019 17:03:17 -0400 Original-Received: (qmail 737 invoked by uid 3782); 2 May 2019 21:03:13 -0000 Original-Received: from acm.muc.de (p4FE15E7B.dip0.t-ipconnect.de [79.225.94.123]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 02 May 2019 23:03:12 +0200 Original-Received: (qmail 9777 invoked by uid 1000); 2 May 2019 21:03:12 -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:158665 Archived-At: Hello, Mauro. On Wed, May 01, 2019 at 19:31:48 -0300, Mauro Aranda wrote: > Alan Mackenzie writes: > > Hello again, Mauro. > Hello Alan. Thanks for looking into this bug! > > Please try out the patch below. On my system, it corrects the > > fontification in both your test file and editfns.c. > I've applied the patch and tried the recipe I provided, and it works fine. > However, when I visit editfns.c and search for EXTRA_CONTEXT_FIELDS, > like I said in my report, I see the following problem with this variables: > struct buffer *buffer_a; > struct buffer *buffer_b; > unsigned char *deletions; > unsigned char *insertions; > All but deletions have face font-lock-variable-name-face. > I can't seem to come up with a simple recipe to reproduce the problem, > so I refer you to that part of editfns.c. > All the following steps, separately with emacs -Q (or you could kill the > buffer if you want) > 1) C-x C-f editfns.c > C-s extra RET > I observe deletions without its correspondent face and if I type: > SPC DEL > deletions gets font-lock-variable-name-face face. However, if I > revert the buffer with M-x revert-buffer RET yes RET buffer_a, deletions > and the first 'buffer' lose their faces. > 2) C-x C-f editfns.c > C-s deletions RET > I see that deletions has the right face. But > M-x revert-buffer > makes it lose it (but *buffer_a keeps its face). > 3) C-x C-f editfns.c > C-s extra RET > deletions without font-lock-variable-name-face. > C-l C-l > M-x revert-buffer > deletions now has font-lock-variable-name-face. > That is all the testing I could do, sorry for not being able to come up > with a better recipe. Let me know if you see the same behavior, or what > else I could try. I believe I have now fixed all these bugs, and indeed I've committed the fix to the master branch. Would you please be so good as to give this fix a "final" test, and if everything is OK, then I can close the bug. Thanks! > Best regards, > Mauro. -- Alan Mackenzie (Nuremberg, Germany).