diff options
| author | Miles Bader | 2005-06-06 02:39:45 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-06-06 02:39:45 +0000 |
| commit | fdffd346262841cb194225ea0acd8059c57ec2d4 (patch) | |
| tree | d8b3699131f7d1b94bc46c7d8be62af6b8b5ebfe /src/image.c | |
| parent | a5c508fe3a3f456c987283156315d0384d38fe9e (diff) | |
| parent | a9b4333620eb259e974445066a8e64cee0c21d69 (diff) | |
| download | emacs-fdffd346262841cb194225ea0acd8059c57ec2d4.tar.gz emacs-fdffd346262841cb194225ea0acd8059c57ec2d4.zip | |
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
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c index b61b07876d3..15e835fef3b 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -616,6 +616,10 @@ static struct image_type *image_types; | |||
| 616 | 616 | ||
| 617 | Lisp_Object Vimage_types; | 617 | Lisp_Object Vimage_types; |
| 618 | 618 | ||
| 619 | /* An alist of image types and libraries that implement the type. */ | ||
| 620 | |||
| 621 | Lisp_Object Vimage_library_alist; | ||
| 622 | |||
| 619 | /* Cache for delayed-loading image types. */ | 623 | /* Cache for delayed-loading image types. */ |
| 620 | 624 | ||
| 621 | static Lisp_Object Vimage_type_cache; | 625 | static Lisp_Object Vimage_type_cache; |
| @@ -696,7 +700,7 @@ lookup_image_type (symbol) | |||
| 696 | struct image_type *type; | 700 | struct image_type *type; |
| 697 | 701 | ||
| 698 | /* We must initialize the image-type if it hasn't been already. */ | 702 | /* We must initialize the image-type if it hasn't been already. */ |
| 699 | if (NILP (Finit_image_library (symbol, Qnil))) | 703 | if (NILP (Finit_image_library (symbol, Vimage_library_alist))) |
| 700 | return 0; /* unimplemented */ | 704 | return 0; /* unimplemented */ |
| 701 | 705 | ||
| 702 | for (type = image_types; type; type = type->next) | 706 | for (type = image_types; type; type = type->next) |
| @@ -7985,6 +7989,8 @@ of `image-library-alist', which see). */) | |||
| 7985 | void | 7989 | void |
| 7986 | syms_of_image () | 7990 | syms_of_image () |
| 7987 | { | 7991 | { |
| 7992 | extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */ | ||
| 7993 | |||
| 7988 | /* Must be defined now becase we're going to update it below, while | 7994 | /* Must be defined now becase we're going to update it below, while |
| 7989 | defining the supported image types. */ | 7995 | defining the supported image types. */ |
| 7990 | DEFVAR_LISP ("image-types", &Vimage_types, | 7996 | DEFVAR_LISP ("image-types", &Vimage_types, |
| @@ -7993,6 +7999,20 @@ Each element of the list is a symbol for a image type, like 'jpeg or 'png. | |||
| 7993 | To check whether it is really supported, use `image-type-available-p'. */); | 7999 | To check whether it is really supported, use `image-type-available-p'. */); |
| 7994 | Vimage_types = Qnil; | 8000 | Vimage_types = Qnil; |
| 7995 | 8001 | ||
| 8002 | DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, | ||
| 8003 | doc: /* Alist of image types vs external libraries needed to display them. | ||
| 8004 | |||
| 8005 | Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol | ||
| 8006 | representing a supported image type, and the rest are strings giving | ||
| 8007 | alternate filenames for the corresponding external libraries. | ||
| 8008 | |||
| 8009 | Emacs tries to load the libraries in the order they appear on the | ||
| 8010 | list; if none is loaded, the running session of Emacs won't | ||
| 8011 | support the image type. Types 'pbm and 'xbm don't need to be | ||
| 8012 | listed; they're always supported. */); | ||
| 8013 | Vimage_library_alist = Qnil; | ||
| 8014 | Fput (intern ("image-library-alist"), Qrisky_local_variable, Qt); | ||
| 8015 | |||
| 7996 | Vimage_type_cache = Qnil; | 8016 | Vimage_type_cache = Qnil; |
| 7997 | staticpro (&Vimage_type_cache); | 8017 | staticpro (&Vimage_type_cache); |
| 7998 | 8018 | ||