all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: 35454@debbugs.gnu.org
Subject: bug#35454: 26.2.50; CC-Mode fontification fails inside macro
Date: Sat, 27 Apr 2019 20:36:46 +0000	[thread overview]
Message-ID: <20190427203646.GA11087@ACM> (raw)
In-Reply-To: <CABczVwfX0wdcfmjeLNtvhGnTpDVZj1XFeqgVEtcteBobgKNLnA@mail.gmail.com>

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).





  reply	other threads:[~2019-04-27 20:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-27 15:57 bug#35454: 26.2.50; CC-Mode fontification fails inside macro Mauro Aranda
2019-04-27 20:36 ` Alan Mackenzie [this message]
2019-05-01 21:02   ` Alan Mackenzie
2019-05-01 22:31     ` Mauro Aranda
2019-05-02  8:57       ` Alan Mackenzie
2019-05-02 14:42         ` Alan Mackenzie
2019-05-02 21:03       ` Alan Mackenzie
2019-05-02 21:44         ` Mauro Aranda
2019-05-03  7:41           ` Alan Mackenzie

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

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

  git send-email \
    --in-reply-to=20190427203646.GA11087@ACM \
    --to=acm@muc.de \
    --cc=35454@debbugs.gnu.org \
    --cc=maurooaranda@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.