SL Baur <steve(a)xemacs.org> writes in xemacs-beta(a)xemacs.org:
I don't see offhand where Custom is doing its glyph searching,
but it
should prefer glyphs in etc/custom above all else. Somehow it is
picking up open-up.xpm in etc/w3.
O.K. I figured this out. Something needs to change.
The function `widget-glyph-find' in wid-edit.el uses a suboptimal
algorithm to find glyphs. It puts `widget-glyph-directory' or
(locate-data-directory "custom") at the front of a search path,
then adds `data-directory-list'. This would be fine except that it
then proceeds to search for a list of formats across the whole
search path with priority going first to .xpm, then to .gif, .png,
.jpg, and .xbm. NOTE 1: I would argue that .png should go to the
head, followed by .xpm, .gif, .jpg and .xbm.
The end result being that "open-up.xpm" in etc/w3 is found ahead of
"open-up.png" in etc/custom when `widget-glyph-find' is called:
(widget-glyph-find "open-up" "blahblah")
even though etc/custom is supposedly first in the search path.
Noting also that the `widget-glyph-cache' only caches the basename,
not the path, it seems like all glyph names across XEmacs and Lisp
extensions must be unique. I don't believe this is a restriction we
can or should enforce.
William, Hrvoje, thoughts?