Hi,
After some twiddling I found that if I use make-image-instance instead
of passing an "instantiator" (as per set-face-background-pixmap) as
the second argument to set-face-background-pixmap, all works just
fine. IOW, the following works reliably:
(defun set-pixmap-background (filename)
"Set current buffer background pixmap"
(interactive "fXPM file: ")
(set-face-background-pixmap
'default
(make-image-instance (vector 'xpm ':file (expand-file-name filename)) nil (list
'color-pixmap) nil)
(current-buffer)))
whereas the following does not work (or rather, works just once):
(defun set-pixmap-background (filename)
"Set current buffer background pixmap"
(interactive "fXPM file: ")
(set-face-background-pixmap
'default
(vector 'xpm ':file (expand-file-name filename))
(current-buffer)))
I do not understand all this stuff, but perhaps somebody who does can
make out who's wrong and where the fix should be - or perhaps I'm
completely missing something (from the docs of
set-face-background-pixmap it seems that the second - not working -
version is correct)...
Dmitry Yaitskov <dimas(a)home.com> wrote:
Hi,
Some time ago (specifically, on 29/12/00), Kilian A. Foth reported the
following bug:
>This bug report will be sent to the XEmacs Development Team,
> not to your local site managers!!
>Please write in English, because the XEmacs maintainers do not have
>translators to read other languages for them.
>
> In XEmacs 21.2 (beta38) "Peisino,Ak(B" [Lucid]
> (sparc-sun-solaris2.8, Mule) of Fri Dec 29 2000 on nats21
> configured using `configure --with-mule --with-xpm
> --with-site-lisp=yes --package-path=/opt/lib/xemacs-21.2-b38/'
>
>Please describe exactly what actions triggered the bug
>and the precise symptoms of the bug:
>
>Doing
>
> (set-face-background-pixmap 'default "/my/pretty/file1.jpeg")
>
>correctly sets the background pixmap the image in file1, but
>following up with
>
> (set-face-background-pixmap 'default "/my/pretty/file2.jpeg")
>
>displays the same image again, not the second one as under 21.1.
>
Well, the bug's still there in beta 43 ("XEmacs 21.2 (beta43)
\"Terspichore\" [Lucid] (i686-pc-cygwin) of Tue Jan 30 2001 on LUCY").
Any ideas?
--
Cheers,
-Dima.