[Q21.5] Make the X11 font menu work again.

Stephen J. Turnbull stephen at xemacs.org
Thu Jan 18 20:54:23 EST 2007


Aidan Kehoe writes:

 >  > I don't understand why you changed the code rather than the docstring.
 > 
 > The code that called it relied on it not reverting the default
 > face. 

IMO, the calling code is broken, then.  The functionality provided by
`(reset-face 'default)' is useful (to me, when hacking, at least), and
reset-face is fairly rarely called.  Once again:

 >  > it makes sense to reset the default face, which results in it
 >  > behaving according to its fallbacks.  `reset-face' is marked as a
 >  > dangerous, irreversible function; isn't that enough?

If you want a function that resets a face to the current default face,
I think it should be called `reset-face-to-default'.

Re: clearing instantiators not added by Custom:

 >  > If people want a font to be controlled by Custom, let them set
 >  > it via Custom, no?  Is this needed to make the font-menu work?
 > 
 > The font-menu uses Custom to change the face family and size, which
 > is well and good, duplicating the frobbing Custom does would be a
 > waste. If, however, a face specifier doesn’t have 'custom in its
 > specifier tag list, as will be the case if it was initialised from
 > X resources or from the corresponding fallback, Custom won’t
 > modify a faces.

I don't understand what you're saying.  I've never had trouble
Customizing any face, but AFAIK no face is initialized with 'custom
tags on any of the instantiators.

 >  > I guess you can recover the resource settings by reinitializing
 >  > the face, but wouldn't it be preferable to keep the
 >  > resource-based instantiators and implement reset-to-default by
 >  > clearing instantiators with the Custom tag-set?
 > 
 > That’s the current situation, and it has the disadvantage that the
 > font menu doesn’t work. 

Well, it *did* work at one time.  AFAIK it does work in 21.4, I'll
need to check.  That's basically the same font-menu code IIRC, except
for the Xft-related kludges in recent 21.5.

More important, I don't see how neutralizing X resources makes it
"really work"; there are other ways of editing face specifications.
According to the logic you've presented, to placate Custom you're
going to need to deprecate the whole set-specifier UI as well as
set-face-font and friends.  Am I missing something special about X
resources?

Can you explain why we want to go there?  It seems to me that what we
want to do is to turn Custom into a convenient front-end to the
specifier API, rather than to remove the specifier API.


More information about the XEmacs-Patches mailing list