[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock requires face to be `defface'd and `defvar'ed
From: |
Alexander Pohoyda |
Subject: |
Re: font-lock requires face to be `defface'd and `defvar'ed |
Date: |
27 Dec 2003 10:26:44 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Miguel Frasson <frasson@math.leidenuniv.nl> writes:
> ;; this code should be enoght to highlight in green all
> ;; `foo's... however a terrible thing happens: the symbol foo-face
> ;; is not set :(
>
> (progn
> ;; defining `foo-face' first just using `defface'
> (defface foo-face '((t (:foreground "green"))) "foo face")
> (defconst foo-font-lock-defaults
> '(
> (("foo". foo-face)) ;keywords
Please try this:
(("foo". 'foo-face)) ;keywords
instead.
> nil nil nil backward-paragraph))
> (make-local-variable 'font-lock-defaults)
> (setq font-lock-defaults foo-font-lock-defaults)
> (font-lock-mode nil) ; turn font-lock off and on
> (font-lock-mode t))
--
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44