Subject: bug#7917: [PATCH] cc-mode: not all templates are types

From: Alan Mackenzie <[email-masked]>
Date: Sun, 28 Feb 2016 21:32:07 +0000

Hello, Lars.

On Sat, Feb 27, 2016 at 02:33:36PM +1030, Lars Ingebrigtsen wrote:
> Lars Ingebrigtsen <[email-masked]> writes:

> > Daniel Colascione <[email-masked]> writes:

> >> For me --- empty scratch buffer, c++-mode, emacs -Q, pasting in
> >> this example, the name of the second function is fontified as a type,
> >> not a function name. In the third function, in the call to foo<int>, foo
> >> is also fontified as a type, although it shouldn't be fontified as
> >> anything at all.

> > Oh, yeah, that's true.  

> And your patch fixes the issue.  Does anybody have any objections to
> applying the patch?

The patch breaks the fontification of certain Java constructs, in
particular, ones looking like this:

    Map<String, Driver> allDrivers = new Map<String, Driver>();
                                         ^^^

With the patch in place, the indicated "Map" doesn't get fontified in
font-lock-type-face as it should.

Before applying any patches like this to CC Mode, could you please run
them through the CC Mode test suite first (or ask Daniel (the OP) or me
to do it).  Thanks!

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).