* Zajcev Evgeny <zevlg(a)yandex.ru> writes:
Hello there. I tried to change image of the glyph using
`set-glyph-image' and found behaviour that i was not expecting. I
summarized my experiments with a little example:
(setq mg (make-glyph))
(progn
(set-glyph-image mg (xpm-button-create "test" 1 "green"
"black"))
(set-extent-end-glyph
(make-extent (point) (point)) mg)
nil) ; (1) form
(progn
(set-glyph-image mg (xpm-button-create "AAA" 1 "red"
"black"))
(set-extent-end-glyph
(make-extent (point) (point)) mg)
nil) ; (2) form
I evaluate first form and got nifty looking button as i expected.
Then i evaluated second form in order to get new button and affect
first button to change its image, but instead i got same button as
first one. Is this ok?
I'm not certain if that is correct behaviour or not.
I personally wouldn't use #'set-glyph-image, but rather do it like
this...
,----
| (setq ext (make-extent (point) (point)))
| (setq test (make-glyph (xpm-button-create "test" 1 "green"
"black")))
| (setq aaaa (make-glyph (xpm-button-create "AAA" 1 "red"
"black")))
| (progn
| (set-extent-end-glyph ext test)
| nil)
| (progn
| (set-extent-end-glyph ext aaaa)
| nil)
`----
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| SXEmacs - The only _______ you'll ever need. |
| Fill in the blank, yes, it's THAT good! |
|------------------------------------<steve(a)sxemacs.org>---|
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta