unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: bojohan+news@dd.chalmers.se (Johan Bockgård)
Subject: Re: [Newbie] Colorizing keywords
Date: Thu, 24 Apr 2003 19:06:06 +0200	[thread overview]
Message-ID: <yoijy91z9669.fsf@helm.dd.chalmers.se> (raw)
In-Reply-To: mailman.5158.1051202519.21513.help-gnu-emacs@gnu.org

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

       reply	other threads:[~2003-04-24 17:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5158.1051202519.21513.help-gnu-emacs@gnu.org>
2003-04-24 17:06 ` Johan Bockgård [this message]
2003-04-25 10:29 ` [Newbie] Colorizing keywords Colin Marquardt
     [not found] <mailman.5118.1051120111.21513.help-gnu-emacs@gnu.org>
2003-04-23 17:54 ` Phillip Lord
2003-04-23 18:10 ` Martin Stemplinger
2003-04-24 16:41   ` Robert Pollard
2003-04-23 17:46 Robert Pollard

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=yoijy91z9669.fsf@helm.dd.chalmers.se \
    --to=bojohan+news@dd.chalmers.se \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).