emacs-devel
[Top][All Lists]
Advanced

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

How to use non-font-lock face in font-lock-keywords?


From: Tassilo Horn
Subject: How to use non-font-lock face in font-lock-keywords?
Date: Wed, 23 Dec 2009 21:31:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Hi all,

I have a problem with the specification of faces in font-lock entries.
When I use either

--8<---------------cut here---------------start------------->8---
(defparameter greql-fontlock-keywords-doc
  (let ((regex "foo"))
    (list (list (concat "\\(?:[`]?" regex "['(]\\)")
                1 'font-lock-function-name-face))))
--8<---------------cut here---------------end--------------->8---

or

--8<---------------cut here---------------start------------->8---
(defparameter greql-fontlock-keywords-doc
  (let ((regex "foo))
    (list (list (concat "\\(?:[`]?" regex "['(]\\)")
                1 font-lock-function-name-face))))
--8<---------------cut here---------------end--------------->8---

(the difference is the quoting of f-l-function-name-face) and then use
this variable as single entry in `font-lock-defaults', it works as
expected.  But when I use 'bold instead of some font-lock-*-face,
nothing is fontified.

I also tried using a FACESPEC (face 'bold), or defined a variable
greql-doc-face with the value 'bold and used the variable as FACESPEC,
neither of those did work. :-(

Why?  What do I need to do to use an arbitrary face?

Bye,
Tassilo




reply via email to

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