[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Font lock question
From: |
Shaun Johnson |
Subject: |
Font lock question |
Date: |
Wed, 28 May 2008 11:34:55 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (Windows/20061207) |
Hi,
I can define a mode to to render colour names on an appropriate background like
so:
(define-derived-mode sj-colour-words-mode nil "Colour Words"
"Colour words appropriately."
(setq font-lock-defaults
'(
(("blue" 0 '(face (fixed-pitch (:background "blue"))))
("red" 0 '(face (fixed-pitch (:background "red"))))
("green" 0 '(face (fixed-pitch (:background "green")))))
t t)))
These elements of font-lock-keywords correspond to the form described as
(MATCHER . SUBEXP-HIGHLIGHTER) in section '23.6.2 Search Based Fontification'
in edition
2.9 of the Elisp manual for emacs 22.2. However I have totally failed to make
the form
described as (MATCHER . FACESPEC) where FACESPEC is a list of the form
(face FACE PROP1 VAL1...) work.
I'm sure I'm just misundertanding something and would be happy if someone could
show me
a working example of this type of element.
Thanks in advance,
Shaun Johnson.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Font lock question,
Shaun Johnson <=