bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#67173: 27.1; support raw string literals in C mode (a GNU C extensio


From: Alan Mackenzie
Subject: bug#67173: 27.1; support raw string literals in C mode (a GNU C extension)
Date: Wed, 15 Nov 2023 22:23:15 +0000

Hello, Eli and Rasmus.

On Wed, Nov 15, 2023 at 15:03:39 +0200, Eli Zaretskii wrote:
> > Date: Tue, 14 Nov 2023 11:30:53 +0100
> > From:  Rasmus Villemoes via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>

> > gcc, when using -std=gnu99 or newer, supports using raw string literals
> > in C code. But emacs' C mode does not do proper syntax highlighting for
> > that case.

Thanks!  I didn't know about that.  I can't find any mention of raw
strings in C in the GCC manual for version 10.3.0.

> > I do not know if that can be fixed by simply adding
> > c-before-change-check-raw-strings to C mode's
> > c-get-state-before-change-functions.

That's the basic idea, yes, with another function to be added to
c-before-font-lock-functions.  But there are several detailed changes
necessary, too.

> Alan, are you looking into this?

I am now.  What's bothering me at the moment is that this is going to
make C Mode slower.  I suppose I could add an option into C Mode so that
raw strings can be enabled only when they're needed, but this would be
quite awkward, and a new departure for CC Mode.

-- 
Alan Mackenzie (Nuremberg, Germany)





reply via email to

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