emacs-devel
[Top][All Lists]
Advanced

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

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


From: Drew Adams
Subject: RE: How to use non-font-lock face in font-lock-keywords?
Date: Wed, 23 Dec 2009 13:59:16 -0800

> >> 1. `font-lock-function-name-face' is a variable (whose 
> >>    value is the symbol `font-lock-function-name-face').
> >>    There is no variable `bold'.
> >>
> >> 2. When you use
> >>    (list (list (concat "\\(?:[`]?" regex "['(]\\)") 1 'bold))))
> >>
> >>    you get a list with the face name (symbol), but it is not quoted.
> >
> > You are right, I have to use (quote 'bold), and then it works.
> 
> 
> I think Drew said (quote bold).

Nope. Tassilo understood correctly. In the source code, you need (quote (quote
bold)), which evaluates to (quote bold). The point is that the face name needs
to be quoted in the result.

I suggested

`((,(concat "\\(?:[`]?" regex "['(]\\)") 1 'bold))

which is equivalent to using (quote (quote bold)) and which produces (quote
bold).





reply via email to

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