help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

font-lock-add-keywords confusion


From: Þorne
Subject: font-lock-add-keywords confusion
Date: 10 Feb 2007 06:25:40 -0800
User-agent: G2/1.0

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]