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

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

Re: syntax highlighting on the fly


From: Jambunathan K
Subject: Re: syntax highlighting on the fly
Date: Fri, 07 Mar 2014 17:50:11 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

(info "(emacs) Font Lock")

(info "(emacs) Highlight Interactively")

Put your cursor after the closing ")" and do C-x C-e.  Hint: Search for
FIXME in the first node.

lee <lee@yun.yagibdah.de> writes:

> Hi,
>
> is something available with emacs to do to syntax highlighting on the
> fly?
>
> "On the fly" means: You have a mode with syntax highlighting which does
> most of the highlighting.  Now you work on a file (source code for some
> program) in a buffer with your mode enabled, and you decide that for
> this particular file, you want "foobar" to be highlighted.
>
> You´d have to somehow tell emacs to do this, for example by adding a
> comment like
>
>
> // highlight: foobar
>
>
> to your file.  You could also do it like
>
>
> #define foobar 25
>
>
> (since you´re using #define anyway) and have all occurances of "foobar"
> highlighted.
>
> It´s probably possible to write something for this, and I wouldn´t even
> know where to start.  Perhaps it´s already built in and I only don´t
> know about it?




reply via email to

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