[Top][All Lists]

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

Re: font-lock-keywords uses only facename

From: Stefan Monnier
Subject: Re: font-lock-keywords uses only facename
Date: 03 Jun 2004 23:58:34 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> If I were writing it today, I'd just do an `eval' as did Simon Marshall:
>> it's simpler and there is no loss of generality.  And adding a quote is
>> really not that difficult.

> Does anyone ever use the eval feature, except old code that has `face'
> variables (a practice which seems out of favor these days)?

Well, the "eval feature" is used extensively at many places, yes.

If you mean "use `eval' even for trivial expressions composed of nothing
more than a symbol", I've used it as a poor man's buffer-local faces
a few times.  But admittedly, it's only rarely used.

> What's certainly the case is that it often causes confusion, although
> admittedly some of this is due to font-lock's `standard' faces using
> variables and faces with exactly the same name.

Right, I think if variables had names like `font-lock-foo-face' while their
content was `font-lock-foo' it would have helped a bit.

Another way to avoid the confusion would have been to introduce a whole new
self-evaluating datatype for faces rather than use symbols.


reply via email to

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