[Top][All Lists]

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

Re: address@hidden: C++-mode: Syntax highlighting: wrong color for funct

From: Ralf Angeli
Subject: Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows]
Date: Thu, 16 Feb 2006 10:07:00 +0100

* Alan Mackenzie (2006-02-15) writes:

> Why don't you construct a regular expression which would only find a "<<"
> which isn't in a maths construct?  I don't know LaTex, but assuming these
> "<<" ">>" pairs can't be nested (is this the case?), you could make this
> regexp stop (with "not found") at a second "<<" (not within a maths
> thingy).

The quotation marks can be nested, there isn't even a requirement that
they have to come in pairs but they are usually used like this.  With
csquotes there is even a LaTeX package which produces sensible output
from nested quotation marks of the same kind.  For example an input
like «foo «bar» baz» could result in a printed output of «foo ‹bar›
baz» or „foo ‚bar‘ baz“.

Anyway, quotation marks are just an example.  There are many other
places where font locking can go wrong and where I'd like to minimize
the impact of such a failure.

> You might want to give an unmated "<<" or ">>" font-lock-warning-face
> until the user completes the construct.

Yes, that's what I had in mind as well.


reply via email to

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