all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Tury <tury.peter@gmail.com>
Subject: Re: Adding color to macro in C mode
Date: Tue, 31 Jan 2006 15:30:42 GMT	[thread overview]
Message-ID: <43z84xa021z3$.1pjyzd5hm0ez5.dlg@40tude.net> (raw)
In-Reply-To: k0n64o04vdw.fsf@metropolis.fi.uib.no

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

      parent reply	other threads:[~2006-01-31 15:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='43z84xa021z3$.1pjyzd5hm0ez5.dlg@40tude.net' \
    --to=tury.peter@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.