[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Newbie] Colorizing keywords
From: |
Johan Bockgård |
Subject: |
Re: [Newbie] Colorizing keywords |
Date: |
Thu, 24 Apr 2003 19:06:06 +0200 |
User-agent: |
Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.2 (usg-unix-v) |
Robert Pollard <rpollard@apple.com> writes:
> What about making my own definitions for colorization? Is it
> possible to create my own database of keywords and define the color
> that is used for each?
[...]
> Any ideas?
Read the fine manual:
,----[ (info "(emacs)Font Lock") ]
| Font Lock highlighting patterns already exist for many modes, but you
| may want to fontify additional patterns. You can use the function
| `font-lock-add-keywords', to add your own highlighting patterns for a
| particular mode. For example, to highlight `FIXME:' words in C
| comments, use this:
|
| (font-lock-add-keywords
| 'c-mode
| '(("\\<\\(FIXME\\):" 1 font-lock-warning-face t)))
|
| To remove keywords from the font-lock highlighting patterns, use the
| function `font-lock-remove-keywords'.
`----
--
Johan Bockgård