From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#35454: 26.2.50; CC-Mode fontification fails inside macro Date: Wed, 1 May 2019 19:31:48 -0300 Message-ID: References: <20190427203646.GA11087@ACM> <20190501210230.GA3999@ACM> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000be2280587db16b3" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="30238"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35454@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 02 00:33:26 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 1hLxn4-0007iL-3m for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 00:33:26 +0200 Original-Received: from localhost ([127.0.0.1]:42188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLxn3-0000PB-0V for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 May 2019 18:33:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLxmt-0000Ng-Es for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 18:33:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLxmr-0002Rv-3Q for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 18:33:15 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59831) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLxmg-0002D7-7C; Wed, 01 May 2019 18:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hLxmg-0003ED-1V; Wed, 01 May 2019 18:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 01 May 2019 22:33:01 +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.155674993112307 (code B ref 35454); Wed, 01 May 2019 22:33:01 +0000 Original-Received: (at 35454) by debbugs.gnu.org; 1 May 2019 22:32:11 +0000 Original-Received: from localhost ([127.0.0.1]:45142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLxlr-0003CP-1v for submit@debbugs.gnu.org; Wed, 01 May 2019 18:32:11 -0400 Original-Received: from mail-lj1-f178.google.com ([209.85.208.178]:46009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLxln-0003Bs-5B for 35454@debbugs.gnu.org; Wed, 01 May 2019 18:32:09 -0400 Original-Received: by mail-lj1-f178.google.com with SMTP id w12so371720ljh.12 for <35454@debbugs.gnu.org>; Wed, 01 May 2019 15:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rxBZILXaOOlFV0l+XJ1bZIYcftDy6Cofeu9NOfX5cfw=; b=nSVgxCKCkKwOPD2mnIXw5/9dTn/AJ4Ty4KZ+8M8FBY4ZUxv4iwyOjCkKN+Mag+Aqod TxBHcx5neXzHq4II6FpTjq8+gULUKJisIWSOBYPFo/TLkgUYQ97MGGNpn6gSBruy6I9I jc7bzKVP30qByidSrngHruy4ztFbv1WZcztp+LJqc0xeSJwZ5cF0UXOA289El8D+sQTj DeGkr0iERWPaFz/+ARHHfayaLevzCz+Flwexx760xY3OcB+RiUricXGEY87UHME+unPo ZdkBprlWQE6+DKO4Sv+nw9i74HY1+b3t2/S63j1abGeX9CDQ8DH5gv0RHtOshdJNeO4j GS4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rxBZILXaOOlFV0l+XJ1bZIYcftDy6Cofeu9NOfX5cfw=; b=gPvuyotTVppPfjqZwuRCvqVfgQhi1GNTk4u7anfpNVjIFTUZzu3R48qidMaYky+rvc A+ZnxaVs9rxvQ9P+9Gof2R5GEUsnXZ+qRCIjozr8yQhOU0HqzBdbUjUiEJxkTlmB5zsJ hN4GILjeD9RNRSyMeM0V0aig5hKuQ/gOiCF0Mrpo4Bfyd6fGdCBIadgCyHdWGk33Uc3b 3l9K1B7/y1mXVkMHP6UnzP+ArmkTChUZEaJFcEvNkrqAiYFii2kZXN72zLuk6V0ZSxmV 9btPPyaID4rR0JJQweLH/l+NefHr4eE1P1eMz3RWjQhd1m+rnGiRLSsUjlQDLSVfSD2+ op3Q== X-Gm-Message-State: APjAAAVh+0MjkmMThwc5STaDBGi4aOoHKJpEPh1NiVC+vUTLjqmVD6vr 911Zp2WEF3X/pQN1FFTRmBzNuMayE8oRBAXlxLo= X-Google-Smtp-Source: APXvYqxLvRDFTry2LJQkqtvEa99KAajqmaLZMT5LwULgby11WFMZugZ4UN2pAHjJaEpVnKjjHIj0SW0ZSJ86i0CVwZE= X-Received: by 2002:a2e:96d9:: with SMTP id d25mr46852ljj.78.1556749921016; Wed, 01 May 2019 15:32:01 -0700 (PDT) In-Reply-To: <20190501210230.GA3999@ACM> 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:158611 Archived-At: --0000000000000be2280587db16b3 Content-Type: text/plain; charset="UTF-8" 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. Best regards, Mauro. --0000000000000be2280587db16b3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Alan Mackenzie <acm@muc.de> writes:

> Hello again, Mauro.

H= ello Alan.=C2=A0 Thanks for looking into this bug!

> Please try o= ut the patch below.=C2=A0 On my system, it corrects the
> fontificati= on 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 r= eport, I see the following problem with this variables:
struct buffer *buffer_a;
struct buffer *buffer_b;
unsigned char *d= eletions;
unsigned char *insertions;

All but deletions have face = font-lock-variable-name-face.

I can't seem to come up with a sim= ple recipe to reproduce the problem,
so I refer you to that part of edit= fns.c.

All the following steps, separately with emacs -Q (or you cou= ld kill the
buffer if you want)
1) C-x C-f editfns.c
C-s extra RET
I observe deletions without its c= orrespondent face and if I type:
SPC DEL
deletions gets font-lock-var= iable-name-face face.=C2=A0 However, if I
revert the buffer with M-x rev= ert-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 s= ee that deletions has the right face.=C2=A0 But
M-x revert-buffer
mak= es it lose it (but *buffer_a keeps its face).

3) C-x C-f editfns.cC-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.<= br>
That is all the testing I could do, sorry for not being able to come= up
with a better recipe.=C2=A0 Let me know if you see the same behavior= , or what
else I could try.

Best regards,
Mauro.
--0000000000000be2280587db16b3--