[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding color to macro in C mode
From: |
Peter Tury |
Subject: |
Re: Adding color to macro in C mode |
Date: |
Tue, 31 Jan 2006 15:30:42 GMT |
User-agent: |
40tude_Dialog/2.0.15.1 |
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