Re: bug#3269: 23.0.93; C-mode text highlighting

Alan Mackenzie <[email protected]>
Newsgroups gmane.emacs.devel,gmane.emacs.pretest.bugs
Message-ID <[email protected]>
Hi, Stefan!

On Mon, May 18, 2009 at 03:53:42PM -0400, Stefan Monnier wrote:
> > OK, here is a patch for half of the problem - it now fontifies a broken
> > string in a #define properly

> For some definition of "properly".

The opening string quote (?\" or ?\') gets f-l-warning-face.  The rest of
the unclosed string (up to the first EOL which isn't escaped) gets
f-l-string-face.

Actually, that's not _quite_ "proper".  A string with an even number of
backslashes at an EOL is broken at that point, but the font locking
doesn't show this (yet).  I don't suppose that will bother you all that
much.  ;-)

> > The second half of the problem is to fix it so that you don't have to
> > type M-o M-o afterwards.  Any change you'll let me do this before
> > this week's pretest, Yidong?

> I think this part is more important.  I don't care much (if at all)
> about how invalid code is highlighted.

I agree it's important.  I've got it working; what's more, the code
doesn't advise any of the font lock functions for (>= emacs-major-version
22).  I'll commit it tomorrow sometime.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.