help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font lock woes


From: Stefan Monnier
Subject: Re: font lock woes
Date: Tue, 05 Mar 2013 21:43:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> ,----
> | (font-lock-add-keywords
> |  nil `((,(regexp-quote "{++") . '(face cm-addition-face read-only t))) t)
> `----
> made fontification of the relevant strings stop working.
> After changing it to:
> ,----
> | (font-lock-add-keywords
> |  nil `((,(regexp-quote "{++") 0 '(face cm-addition-face read-only t))
> `----
> fontification worked again.

Hmm... I can't find your previous email, but I now notice there are
2 differences in the above lines.  I focused on the `how' argument to
font-lock-add-keywords, but the other important one is that

   (font-lock-add-keywords
    nil `((,(regexp-quote "{++") . '(face cm-addition-face read-only t))) t)

should be

   (font-lock-add-keywords
    nil `((,(regexp-quote "{++") (0 '(face cm-addition-face read-only t)))) t)

because the (REGEXP . FACE) form only works if FACE is a non-list sexp.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]