Mercurial > emacs
diff src/image.c @ 90188:01137c1fdbe9
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-57
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 324-352)
- Merge from gnus--rel--5.10
- Update from CVS
- etc/emacs-buffer.gdb: Remove RCS keywords
* gnus--rel--5.10 (patch 70-79)
- Update from CVS
- Merge from emacs--cvs-trunk--0
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 06 Jun 2005 02:39:45 +0000 |
parents | 5b029ff3b08d 94db1d097527 |
children | 173dee4e2611 |
line wrap: on
line diff
--- a/src/image.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/image.c Mon Jun 06 02:39:45 2005 +0000 @@ -616,6 +616,10 @@ Lisp_Object Vimage_types; +/* An alist of image types and libraries that implement the type. */ + +Lisp_Object Vimage_library_alist; + /* Cache for delayed-loading image types. */ static Lisp_Object Vimage_type_cache; @@ -696,7 +700,7 @@ struct image_type *type; /* We must initialize the image-type if it hasn't been already. */ - if (NILP (Finit_image_library (symbol, Qnil))) + if (NILP (Finit_image_library (symbol, Vimage_library_alist))) return 0; /* unimplemented */ for (type = image_types; type; type = type->next) @@ -7985,6 +7989,8 @@ void syms_of_image () { + extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */ + /* Must be defined now becase we're going to update it below, while defining the supported image types. */ DEFVAR_LISP ("image-types", &Vimage_types, @@ -7993,6 +7999,20 @@ To check whether it is really supported, use `image-type-available-p'. */); Vimage_types = Qnil; + DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, + doc: /* Alist of image types vs external libraries needed to display them. + +Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol +representing a supported image type, and the rest are strings giving +alternate filenames for the corresponding external libraries. + +Emacs tries to load the libraries in the order they appear on the +list; if none is loaded, the running session of Emacs won't +support the image type. Types 'pbm and 'xbm don't need to be +listed; they're always supported. */); + Vimage_library_alist = Qnil; + Fput (intern ("image-library-alist"), Qrisky_local_variable, Qt); + Vimage_type_cache = Qnil; staticpro (&Vimage_type_cache);