From: Teemu Likonen <tlikonen@iki.fi>
To: extronom@googlemail.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: set face for added font lock keywords
Date: Mon, 10 Jan 2011 08:43:21 +0200 [thread overview]
Message-ID: <871v4ls1h2.fsf@mithlond.arda> (raw)
In-Reply-To: <865aa6b0-9ca4-4b98-8b41-ecc8c245e84d@r29g2000yqj.googlegroups.com> (extronom@googlemail.com's message of "Sun, 9 Jan 2011 07:27:30 -0800 (PST)")
* 2011-01-09 07:27 (-0800), extronom@googlemail.com wrote:
> I'm trying to add some new keywords by doing font-lock-add-keywords so
> that a FIXME keyword gets highlighted, which works quite well. When I
> try to change the color of the used face it doesn't work and probably
> somebody could give me a hint what the problem is here (I'm still a
> newbie regarding elisp programming).
I'm the author of wcheck-mode [1], so perhaps quite naturally I would
use it for this task too. Let's create a new language called "fixme" and
choose some face for highlighting:
;; Make sure the variable exists.
(defvar wcheck-language-data nil)
(push '("fixme"
(program . (lambda (strings)
(when (member "FIXME" strings)
(list "FIXME"))))
(face . highlight))
wcheck-language-data)
This configuration uses face "highlight" but you can use any face you
want. Change languages with command wcheck-change-language and switch
the mode on and off with command wcheck-mode. See the Emacs wiki page
[1] for more information about wcheck-mode.
---------------
1. http://www.emacswiki.org/emacs/WcheckMode
prev parent reply other threads:[~2011-01-10 6:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-09 15:27 set face for added font lock keywords extronom
2011-01-10 5:31 ` Suvayu Ali
2011-01-10 5:34 ` Suvayu Ali
2011-01-10 6:43 ` Teemu Likonen [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=871v4ls1h2.fsf@mithlond.arda \
--to=tlikonen@iki.fi \
--cc=extronom@googlemail.com \
--cc=help-gnu-emacs@gnu.org \
/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.