all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Adding color to macro in C mode
@ 2006-01-31  9:08 Joakim Hove
  2006-01-31 10:26 ` David Hansen
  2006-01-31 15:30 ` Peter Tury
  0 siblings, 2 replies; 3+ messages in thread
From: Joakim Hove @ 2006-01-31  9:08 UTC (permalink / raw)



Hello,

I am using emacs to program C. I have a (C) macro F_DIFF(a,b,c) which
I use quite a lot in my code. I would like emacs to color instances of
this macro so it stands out more clearly in the code - any tips on how
to achieve that?

Joakim

-- 
Joakim Hove
hove AT ntnu.no                    /    
Tlf: +47 (55 5)8 27 13            /     Stabburveien 18		 
Fax: +47 (55 5)8 94 40           /      N-5231 Paradis		 
http://www.ift.uib.no/~hove/    /      	55 91 28 18 / 92 68 57 04

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

* Re: Adding color to macro in C mode
  2006-01-31  9:08 Adding color to macro in C mode Joakim Hove
@ 2006-01-31 10:26 ` David Hansen
  2006-01-31 15:30 ` Peter Tury
  1 sibling, 0 replies; 3+ messages in thread
From: David Hansen @ 2006-01-31 10:26 UTC (permalink / raw)


On Tue, 31 Jan 2006 10:08:43 +0100 Joakim Hove wrote:

> I am using emacs to program C. I have a (C) macro F_DIFF(a,b,c) which
> I use quite a lot in my code. I would like emacs to color instances of
> this macro so it stands out more clearly in the code - any tips on how
> to achieve that?

http://www.emacswiki.org/cgi-bin/wiki/AddKeywords

David

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

* Re: Adding color to macro in C mode
  2006-01-31  9:08 Adding color to macro in C mode Joakim Hove
  2006-01-31 10:26 ` David Hansen
@ 2006-01-31 15:30 ` Peter Tury
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Tury @ 2006-01-31 15:30 UTC (permalink / raw)


On Tue, 31 Jan 2006 10:08:43 +0100, Joakim Hove wrote:

> Hello,
> 
> I am using emacs to program C. I have a (C) macro F_DIFF(a,b,c) which
> I use quite a lot in my code. I would like emacs to color instances of
> this macro so it stands out more clearly in the code - any tips on how
> to achieve that?

If you want to highlight it only temporarily you may want to try
highlight-regexp:

C-x w h runs the command highlight-regexp
   which is an alias for `hi-lock-face-buffer' in `hi-lock'.
(highlight-regexp REGEXP &optional FACE)

Set face of each match of REGEXP to FACE.

Interactively, prompt for REGEXP then FACE.  Buffer-local history
list maintained for regexps, global history maintained for faces.
Use M-n and M-p to retrieve next or previous history item.
(See info node `Minibuffer History')

or highlight-phrase:

C-x w p runs the command highlight-phrase
   which is an alias for `hi-lock-face-phrase-buffer' in `hi-lock'.
(highlight-phrase REGEXP &optional FACE)

Set face of each match of phrase REGEXP to FACE.

Whitespace in REGEXP converted to arbitrary whitespace and initial
lower-case letters made case insensitive.

These are in my Edit menu also.

Br,
P

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

end of thread, other threads:[~2006-01-31 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-31  9:08 Adding color to macro in C mode Joakim Hove
2006-01-31 10:26 ` David Hansen
2006-01-31 15:30 ` Peter Tury

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.