GNU bug report logs - #3269
23.0.93; C-mode text highlighting

Previous Next

Packages: emacs, cc-mode;

Reported by: Thomas Christensen <thomasc <at> thomaschristensen.org>

Date: Wed, 13 May 2009 07:20:03 UTC

Severity: normal

Done: Glenn Morris <rgm+emacsbugs <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #70 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: emacs-pretest-bug <at> gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
        3269 <at> debbugs.gnu.org,
        Thomas Christensen <thomasc <at> thomaschristensen.org>,
        emacs-devel <at> gnu.org
Subject: Re: bug#3269: 23.0.93; C-mode text highlighting
Date: Mon, 18 May 2009 21:30:30 +0000
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).




This bug report was last modified 15 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.