all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Davin Pearson <davin.pearson@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Void variable error in fontification code
Date: Fri, 11 Nov 2016 17:04:16 +0100	[thread overview]
Message-ID: <87pom2f1fj.fsf@web.de> (raw)
In-Reply-To: <15289920-037f-45b7-94ec-ec67ef271274@googlegroups.com> (Davin Pearson's message of "Thu, 10 Nov 2016 18:29:03 -0800 (PST)")

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.



      reply	other threads:[~2016-11-11 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11  2:29 Void variable error in fontification code Davin Pearson
2016-11-11 16:04 ` Michael Heerdegen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pom2f1fj.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=davin.pearson@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.