Re: [PATCH] Delayed loading of image libraries
Juanma Barranquero <jmbarranquero <at> wke.es>
2004-07-01 09:30:49 GMT
On Wed, 30 Jun 2004 11:42:34 -0400
Miles Bader <miles <at> gnu.org> wrote:
> The result of `create-image' can be saved in a lisp file, and later loaded,
> in which case the image will be displayed without `init-image-library' being
> called from `image-type-available-p'y
It can be loaded, sure, but can it be *displayed* without
`image-type-available-p' being called? I'd say that's a bug.
> I added a the call to make sure it
> always gets called one way or another.
The current situation is Not Good. Andreas has fixed your patch by
passing it Qnil, which "works" in the sense that init-image-library
doesn't fail. But:
- It is now effectively a noop, because init-image-library'ing any
image type from inside lookup_image_type will not load it.
- Emacs on Windows crashes on certain kinds of image files (notably
TIFFs). I think that's related to something I asked yesterday:
lookup_image_type can return NULL, but at places its return value is
just checked with xassert, which could be a noop, so it is posible
to end creating image types with image->type == NULL. Why it is
allowed?
- We could make image-library-alist available from C and pass it to
the call to init-image-library on lookup_image_type, but then, why
(Continue reading)