unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to use non-font-lock face in font-lock-keywords?
@ 2009-12-23 20:31 Tassilo Horn
  2009-12-23 21:14 ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2009-12-23 20:31 UTC (permalink / raw)
  To: emacs-devel

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




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

end of thread, other threads:[~2009-12-23 22:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-23 20:31 How to use non-font-lock face in font-lock-keywords? Tassilo Horn
2009-12-23 21:14 ` Drew Adams
2009-12-23 21:45   ` Tassilo Horn
2009-12-23 21:50     ` Lennart Borgman
2009-12-23 21:59       ` Drew Adams
2009-12-23 22:08         ` Lennart Borgman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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