[Top][All Lists]

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

Need help with font-lock

From: Osor77
Subject: Need help with font-lock
Date: Mon, 19 Apr 2010 12:44:21 -0700 (PDT)

Hi All,

I've recently started to use emacs to write C code and I'm pretty happy
about it.
There is one thing that I haven't been able to figure out, that is how to
highlight format strings and escape characters.
I've found a solution, but it highlighted the whole string, not just the
format characters and the escapes. vi does it by default and it's the only
thing I really miss from coding using vi.
As an example, given

printf ("Your number is %4d\n", number)

I would like emacs, apart from the rest of the syntax highlighting, to
highlight "%d4\n" and ONLY that, in a different colour.
I'm not very fluent in lisp, so I'd greatly appreciate any help.

View this message in context:
Sent from the Emacs - Help mailing list archive at

reply via email to

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