all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Special font for lines with suffix
@ 2009-12-28  2:25 Meekohi
  2009-12-28 11:40 ` Pascal J. Bourguignon
  0 siblings, 1 reply; 3+ messages in thread
From: Meekohi @ 2009-12-28  2:25 UTC (permalink / raw)
  To: help-gnu-emacs

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?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Special font for lines with suffix
  2009-12-28  2:25 Special font for lines with suffix Meekohi
@ 2009-12-28 11:40 ` Pascal J. Bourguignon
  2009-12-28 19:53   ` Meekohi
  0 siblings, 1 reply; 3+ messages in thread
From: Pascal J. Bourguignon @ 2009-12-28 11:40 UTC (permalink / raw)
  To: help-gnu-emacs

Meekohi <meekohi@gmail.com> 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/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Special font for lines with suffix
  2009-12-28 11:40 ` Pascal J. Bourguignon
@ 2009-12-28 19:53   ` Meekohi
  0 siblings, 0 replies; 3+ messages in thread
From: Meekohi @ 2009-12-28 19:53 UTC (permalink / raw)
  To: help-gnu-emacs

On Dec 28, 6:40 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Meekohi <meek...@gmail.com> 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-28 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-28  2:25 Special font for lines with suffix Meekohi
2009-12-28 11:40 ` Pascal J. Bourguignon
2009-12-28 19:53   ` Meekohi

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.