help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++-mode colouring around Constructor


From: Jacob Gerlach
Subject: Re: C++-mode colouring around Constructor
Date: Thu, 18 Dec 2014 23:46:16 +0000

On Tue Dec 16 2014 at 7:14:22 AM RJD <3246251196ryan@gmail.com> wrote:

> The problem is that the first constructor's signature does not adhere to
> the
> correct colour coding. But, if I massage things about a bit: for instance,
> if I remove the colon from the access modifier public and put it back. Or,
> if I move the block of code one line down after the modifier the colour
> coding is corrected again.
>
I often experience similar effects in C++ header files


> It seems to only have happen to
> anything immediately proceeding an access modifier.
>
I have noticed irregularities on lines immediately following access
modifiers in the past, but in general my experience is that this is not
restricted even to classes. The example that I have open right now is not
even a class header.

I've produced a MWE:
test.h:
=============================
#ifndef FOO_HEADER
#define FOO_HEADER

std::vector<double> bar(MyClass);

MyClass foo(MyClass);
#endif
=============================
emacs -q test.h
M-x c++-mode RET

The argument to function bar is not fontified (but the arg to function foo
is fontified. Making any change to the buffer after the 1st line and before
the semicolon following the declaration of bar causes font lock to kick in
correctly.

Does this perhaps have something to do with just in time font lock? I don't
know enough to diagnose anything, only to guess that it could be involved.

Cheers,
Jake


reply via email to

[Prev in Thread] Current Thread [Next in Thread]