[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Void variable error in fontification code
From: |
Michael Heerdegen |
Subject: |
Re: Void variable error in fontification code |
Date: |
Fri, 11 Nov 2016 17:04:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Davin Pearson <davin.pearson@gmail.com> writes:
> (setq d-face-m4 'd-face-m4)
> (setq d-face-m4-dnl 'd-face-m4-dnl)
> (,(concat "\\(\\<m4_" "dnl\\)\\(.$\\)") (1 d-face-m4-dnl t) (2
> font-lock-comment-face))
I think you get confused by the fact that symbols are used as face
names. For font lock keywords, faces are specified via face
expressions. You specify a variable above, so its value has to be set
(to a face name), else you get the unbound error.
Instead, you can directly specify a face in form of a symbol, and since
this place is evaluated, you need to quote the name.
It's a bit weird in Emacs that faces effectively use a separate name
space, but they are specified as symbols, and in some cases, variables
having the same name as a face are bound to that face name (symbol).
Michael.