emacs-devel
[Top][All Lists]
Advanced

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

RE: Simplification of faces


From: Drew Adams
Subject: RE: Simplification of faces
Date: Sun, 30 Sep 2007 16:53:56 -0700

> I am thinking of essentially eliminating the face attributes as a way
> to control what a face looks like.  Programs would use only `defface'
> and `face-spec-set'.

What about `modify-face'?

> In addition, a spec given in `face-spec-set' would totally replace
> whatever spec was previously given for the same face using the
> `defface' or `face-spec-set'.  Thus, the appearance information for a
> face would consist of a single Lisp datum, plus X resources.
> (Inheritance from other faces would still occur.)

I'm not too clear on `face-spec-set'. Is what it does now is replace only
those attributes that are included in its SPEC arg, leaving the others
alone?

Its code and doc are a bit confusing to me - it seems to say that it first
"resets all attributes of FACE on FRAME to unspecified"
(face-spec-reset-face). That makes me think that it does what you propose to
do: totally replace the existing spec.

Please help me a little to understand the issue.

> I've checked all the uses of `face-spec-set' outside of custom and
> faces.el.  It seems they would not need to be changed.
>
> However, this would require rewriting the code that calls
> `set-face-attribute' and the older functions such as
> `set-face-foreground' that set single attributes.  There are only
> about 8 packages in Emacs which do so, so it would not be a big job.
> However, there may be some other programs that users use which still
> rely on this feature.

Rely on which feature? Sorry, but it's not clear to me what feature you
would be taking away or changing. If you can clarify, I'll check my code to
see how it might be impacted. I do quite a lot of face attribute changing in
different ways. I hope that I will at least be able to still use
`modify-face'.

> What do people think?

I don't understand the difference in this regard between `face-spec-set' and
`set-face-attribute'. Could you summarize the problem that you want to fix
for the latter?







reply via email to

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