[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5129: 23.1.50; adding font-lock-keywords for face highlight
From: |
Glenn Morris |
Subject: |
bug#5129: 23.1.50; adding font-lock-keywords for face highlight |
Date: |
Sat, 05 Dec 2009 15:32:07 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
"Roland Winkler" wrote:
> (font-lock-add-keywords nil '(("foo" . font-lock-constant-face)))
works
> (font-lock-add-keywords nil '(("foo" . highlight)))
doesn't work.
I think you are running into the old issue that faces should be quoted
in font-lock keywords, else they will be treated as variables. For
historical reasons, font-lock-constant-face (etc) as well as being a
face, is a variable whose value is that face.
Instead, try
(font-lock-add-keywords nil '(("foo" . 'highlight)))