From xemacs-m  Mon Jun  2 19:04:27 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id TAA08744
	for <xemacs-beta@xemacs.org>; Mon, 2 Jun 1997 19:04:26 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id CAA29951; Tue, 3 Jun 1997 02:04:26 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: [Marc Nozell <marc@nozell.com>] xpm bug in Gnus v5.4.56
References: <kigiuzwskoi.fsf@jagor.srce.hr> <QQcsgl18678.199706022346@crystal.WonderWorks.COM>
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
X-Tom-Swifty: 
   "Wait! You need to enable interrupts first!" Tom said preemptorally.
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 03 Jun 1997 02:04:25 +0200
In-Reply-To: Kyle Jones's message of Mon, 2 Jun 1997 19:46:22 -0400 (EDT)
Message-ID: <kig910ssgae.fsf@jagor.srce.hr>
Lines: 38
X-Mailer: Gnus v5.4.52/XEmacs 20.2

Kyle Jones <kyle_jones@wonderworks.com> writes:

>  > was to try, in turn, each of these formats.  But it turns out that
>  > this bugs out when XEmacs is compiled without xpm, gif, etc.
> 
> Well, there are different levels of failure.  The code expects
> you to use featurep to see if the image format is supported by
> the binary, before trying to create an image specifier containing
> the instantiator.  If you use an unsupported image type you get
> an syntax error right away.

That's horrible.  I'd like the instantiator to be passed as valid, but 
the instantiation to fail.  Using `featurep' for this tends to create
gross code.  The above example would be something like:

>  > (make-glyph '([xpm :file "something.xpm"]
>  >               [gif :file "something.gif"]
>  >               [xbm :file "something.xbm"]
>  >               [string :data "Image"]))

(make-glyph `(,@(and (featurep 'xpm) (list [xpm :file "something.xpm"]))
              ,@(and (featurep 'gif) (list [gif :file "something.gif"]))
              ,@(and (featurep 'xbm) (list [xbm :file "something.xbm"]))
              [string :data "Image"])

And that's one of the simpler cases. :-(

> If you use valid instantiator, the instantiation code will then
> fallback through the list if the GIF/JPEG/whatever image cannot be
> instantiated.

Well, if the feature is not present, it's a decent reason not to
instantiate the image. :-)

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
The end of the world is coming...  SAVE YOUR BUFFERS!

