unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* font-lock-add-keywords confusion
@ 2007-02-10 14:25 Þorne
  2007-02-10 14:41 ` Þorne
  0 siblings, 1 reply; 3+ messages in thread
From: Þorne @ 2007-02-10 14:25 UTC (permalink / raw)
  To: help-gnu-emacs

I'm having major trouble understanding the documentation on faces--
specifically font-lock-add-keywords.  This works for me (emacs 21.3.1
Windows):

(font-lock-add-keywords nil
  '(("foo" 0 font-lock-builtin-face)))

but this does not:

(font-lock-add-keywords nil
  '(("foo" 0 underline)))

Nor with any other face--except the font-lock faces.  If i do M-x list-
faces-display, `underline' is there and looks right.

So i try:

(defface font-lock-underlined-face
  '((t (:underline t)))
  "Font Lock mode face used to underline."
  :group 'font-lock-highlighting-faces)

(font-lock-add-keywords nil
  '(("foo" 0 font-lock-underlined-face)))

but still no luck, even though again it looks like the new face is
defined ok and works--at least in customize and in list-faces-
display.

So what am i missing?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-10 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-10 14:25 font-lock-add-keywords confusion Þorne
2007-02-10 14:41 ` Þorne
2007-02-10 20:10   ` Stefan Monnier

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).