"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> writes:
Many of the face functions associated with Custom (some of which
have
leaked into other libraries, such as lisp/faces.el) use terminology
different from that documented in Info | Lispref | Specifiers.
The face specifications interface (see the documentation to `defface')
don't really have anything directly to do with XEmacs specifier
interface. Indirectly, it should solve a subset of the problem XEmacs
specifiers are supposed to solve.
For example, some functions (eg `face-spec-set') specialize the
specifier concept of "locale" to "frame" (in the sense that the
argument which represents the specifier's locale is called "frame";
I don't think the semantics are altered at all).
Historically, XEmacs at some point generalized `frame' to `locale'.
In other cases the representation of
objects is changed. Eg, specifiers characterize the display with a
tag-set [simple list] like `(x color)' while Custom uses alists like
`((type x) (class color))'.
Is that what a tag set is? I read the chapter about specifiers in the
XEmacs Lisp manual, and it was completely incomprehensible to me.
I wrote the face specification interface to have something simple I
could understand that would work the same on both Emacs and XEmacs,
and hoped someone someday would write a function to translate the
simple face specifications into XEmacs specifiers. Much the same idea
as easymenu is based on. I believe Hrvoje Niksic tried, but found
that the XEmacs specifiers missed some (tags?) necessary.
This use of two different interfaces in lisp/faces.el is quite
disconcerting. The functions defined below the comment "used to be in
cus-face.el but logically belong [in faces.el]" use a different (but
not obviously so and only indirectly documented) interface from the
rest of faces.el. It was very tempting to think that the DISPLAY
argument was just an alias for TAG-SET, but that's not so.
`face-spec-set' started life as an internal customize function, in the
custom namespace. RMS moved it from custom to `faces.el', and made it
public. I renamed the XEmacs version in `cus-face.el' to be consitent
with Emacs. Hrvoje moved it to `faces.el'.
(2) Can the interface of a function like `faces-spec-set' in
lisp/faces.el be changed?
Not incompatibly, since it is a public function (indirectly) imported
from Emacs. I see no reason custom has to use it, as long as the
`defface' and `custom-set-faces' interfaces doesn't change.
I think you should concentrate on implementing the interface of those
two functions, not `face-spec-set'.