I'm currently looking at the relationship of Custom to Mule, primarily
with respect to fonts.
[Aside to Kyle: I'll keep working on this but I no longer think I'll
have code to fix the custom-set-faces bug any time soon. For 21.0,
the redefinition of reset-faces looks like the way to go.]
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. 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). 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))'.
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.
(1) Why does Custom do this with faces? For FSF compatibility? Or is
there a technical reason to do it for XEmacs too?
The kind of manipulation that Custom does with ordinary properties
mostly defeats the purpose of using specifiers, as far as I can see
anyway. In particular, this is going to make properly fixing the
"custom-set-faces nukes all of Mule's fonts and makes my XEmacs
blanch" bug quite complicated---and probably most of it will happen
outside the specifier functionality by manipulating those extra
properties. Extending Custom faces to handle customizing Mule fonts
is going to be even worse, I'm afraid. But specifiers are capable of
handling all these problems smoothly, simply by leaving them to work
by themselves. Or aren't they?
(2) Can the interface of a function like `faces-spec-set' in
lisp/faces.el be changed? (It's one of the ones moved from
cus-face.el.) I would like it to use the specifier interface (some
combination of FACE LOCALE TAG-SET EXACT-P HOW-TO-ADD) but I suspect
that that would cause problems in Custom. Would it be a problem to
add a (partially redundant) &optional tag-set argument?
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Telfax: +81 (298) 53-5091
__________________________________________________________________________
__________________________________________________________________________
What are those two straight lines for? "Free software rules."