Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Special font for lines with suffix

0 views
Skip to first unread message

Meekohi

unread,
Dec 27, 2009, 9:25:36 PM12/27/09
to
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?

Pascal J. Bourguignon

unread,
Dec 28, 2009, 6:40:48 AM12/28/09
to
Meekohi <mee...@gmail.com> writes:

I would try:

(font-lock-add-keywords nil '("^.*//!.*" 0 font-lock-warning-face prepend))


--
__Pascal Bourguignon__ http://www.informatimago.com/

Meekohi

unread,
Dec 28, 2009, 2:53:11 PM12/28/09
to
On Dec 28, 6:40 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:

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.

0 new messages