Subject: Re: bug#5129: 23.1.50; adding font-lock-keywords for face highlight
From: Stefan Monnier <[email-masked]>
To: Roland Winkler <[email-masked]>
Date: Sat, 05 Dec 2009 16:04:29 -0500

>   (font-lock-add-keywords nil '(("foo" . font-lock-constant-face)))
                                           ^^^^^^^^^^^^^^^^^^^^^^^
> Yet when I do instead

>   (font-lock-add-keywords nil '(("foo" . highlight)))
                                           ^^^^^^^^^

Thos two things are treated by font-lock as a Lisp expression
to evaluate.  Since font-lock-constant-face is a variable (whose
content is usually the symbol font-lock-constant-face), the first will
work, whereas the second will either signal en error (because the
variable `highlight' doesn't exist) or lead to odd behavior (because
`highlight' just happens to be let-bound by one of the caller).

I.e. you want

   (font-lock-add-keywords nil '(("foo" . 'highlight)))
                                         ^^^

-- Stefan