I was trying to get xpm-mode to display different cursors at different
times, and had a little trouble getting the pointer to change. I thought I
would mention it here, as I'm not sure that the behavior is intentional.
Based on the Lispref->Glyphs->Using Glyphs->External-Glyphs section of the
documentation, I thought I should be able to pass an image instantiator into
set-glyph-image; something like:
(set-glyph-image text-pointer-glyph [ xpm :file
"I://xemacs_macros//test.xpm" ])
And indeed, that changes the pointer over the text just fine on a fresh
launch of xemacs. However, repeated calls to the same command (with
different images) have no effect.
I also tried making an image specifier from the icon, and using that instead
but it behaved the same; I could change the pointer once, but not again.
I'm assuming that this means that the specifier doesn't have a value for the
global locale to start with, and so the first command works. After that
however, for some reason it can't override
that with newer specifications. I also tried setting HOW-TO-ADD to
'remove-all, but that didn't affect things at all.
What I found that did work was to pass in an image instance to
set-glyph-image:
(set-glyph-image text-pointer-glyph (make-image-instance [ xpm :file
"I://xemacs_macros//test.xpm" ] nil 'pointer))
Using image instances, I could repeatedly change the pointer. However, I
noticed in the set-glyph-image doc string that an image instance isn't even
listed as a valid input.
I'm not sure why exactly an instance behaves differently from an
instantiator, or if there is some extra command I would need to run to
update to the new cursor when using an instantiator.
If you could shed some light on this, I would be grateful. I'm also
attaching a pair of small cursor xpms I was using for testing.
Sincerely,
Byrel
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta