[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC-mode highlight change between 24.5 and 25
From: |
Oleh Krehel |
Subject: |
Re: CC-mode highlight change between 24.5 and 25 |
Date: |
Mon, 05 Sep 2016 11:27:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Hi Alan,
Alan Mackenzie <address@hidden> writes:
> OK. Here's a first approximation to a solution, which I would be
> grateful if you could try out on real code. Please let me know how well
> it works, and if it introduces any nasty looking bugs.
>
> What I've done is to count nesting depth of braces inside a class or
> namespace, etc. When that depth is 1, we're at the top level, and
> anything looking like a function is fontified as one. When the depth is
> more than 1, we're not at top level, and anything looking like a
> function is fontified as a uniform initialisation.
>
> The following patch should apply OK to the savannah master branch:
Thanks for the patch. I'm testing it now. It works fine with the example
that I initally gave. However, this one does not work:
template <class T> void barf (T t, const char *file_name) {
std::ofstream fout (file_name);
fout << t;
fout.close ();
}
Here, "template <class T>" is what confuses the font-lock. In C++, these
angle braces can be nested to an arbitrary depth.
Oleh
- Re: CC-mode highlight change between 24.5 and 25, (continued)
- Re: CC-mode highlight change between 24.5 and 25, Oleh Krehel, 2016/09/02
- Re: CC-mode highlight change between 24.5 and 25, Alan Mackenzie, 2016/09/04
- Re: CC-mode highlight change between 24.5 and 25,
Oleh Krehel <=
- Re: CC-mode highlight change between 24.5 and 25, Alan Mackenzie, 2016/09/05
- Re: CC-mode highlight change between 24.5 and 25, Oleh Krehel, 2016/09/06
- Re: CC-mode highlight change between 24.5 and 25, Alan Mackenzie, 2016/09/06
- Re: CC-mode highlight change between 24.5 and 25, Alan Mackenzie, 2016/09/07
- Re: CC-mode highlight change between 24.5 and 25, Oleh Krehel, 2016/09/09
- Re: CC-mode highlight change between 24.5 and 25, Alan Mackenzie, 2016/09/11