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

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

Re: Special font for lines with suffix


From: Meekohi
Subject: Re: Special font for lines with suffix
Date: Mon, 28 Dec 2009 11:53:11 -0800 (PST)
User-agent: G2/1.0

On Dec 28, 6:40 am, address@hidden (Pascal J. Bourguignon)
wrote:
> Meekohi <address@hidden> writes:
> > When debugging code, I tend to put in hacks, and then I forget to take
> > them out later. What I'd like is to be able to end a line with "//!"
> > or something similar and have emacs increase the font-size (or
> > something similar) to make it stand out visually. I don't know how to
> > get started. Any advice or recommendations on how to accomplish this?
>
> I would try:
>
> (font-lock-add-keywords nil '("^.*//!.*" 0 font-lock-warning-face prepend))
>
> --
> __Pascal Bourguignon__                    http://www.informatimago.com/

Hi Pascal thanks so much that is perfect :) For any interested users
that come along later, I ended up specifically using:

(add-hook 'c++-mode-hook (lambda () (font-lock-add-keywords nil
'(("//!.*" 0 font-lock-warning-face t)))))

because highlighting the whole line turned out to be very distracting.


reply via email to

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