diff options
| author | Juanma Barranquero | 2010-10-13 16:50:06 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-10-13 16:50:06 +0200 |
| commit | 2e288d54f05ba6e72a227ed3857a8098ca585b50 (patch) | |
| tree | 721182610fc404c5469c5dcf6375b0b95692fad5 /src | |
| parent | d0e0de31a6628cd38c69f555aebab0a49ff64418 (diff) | |
| download | emacs-2e288d54f05ba6e72a227ed3857a8098ca585b50.tar.gz emacs-2e288d54f05ba6e72a227ed3857a8098ca585b50.zip | |
Rename `image-library-alist' to `dynamic-library-alist'.
* etc/NEWS: Mention `dynamic-library-alist'.
* lisp/image.el (image-library-alist): Declare as obsolete alias.
(image-type-available-p): Use `dynamic-library-alist'.
* lisp/term/w32-win.el (dynamic-library-alist):
Use instead of `image-library-alist'.
* nt/INSTALL: Refer to `dynamic-library-alist'.
* src/image.c (Vimage_library_alist)
(syms_of_image) <image-library-alist>: Move to src/emacs.c and rename.
(lookup_image_type): Use Vdynamic_library_alist.
(Finit_image_library): Doc fix.
* src/emacs.c (Vdynamic_library_alist)
(syms_of_emacs) <dynamic-library-alist>: Move from src/image.c and rename.
Doc fix.
* src/lisp.h (Vdynamic_library_alist): Declare extern.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/emacs.c | 21 | ||||
| -rw-r--r-- | src/image.c | 29 | ||||
| -rw-r--r-- | src/lisp.h | 1 |
4 files changed, 41 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c44cd507693..9100259c978 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2010-10-13 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * emacs.c (Vdynamic_library_alist) | ||
| 4 | (syms_of_emacs) <dynamic-library-alist>: Move from image.c and rename. | ||
| 5 | Doc fix. | ||
| 6 | |||
| 7 | * lisp.h (Vdynamic_library_alist): Declare extern. | ||
| 8 | |||
| 9 | * image.c (Vimage_library_alist) | ||
| 10 | (syms_of_image) <image-library-alist>: Move to emacs.c and rename. | ||
| 11 | (lookup_image_type): Use Vdynamic_library_alist. | ||
| 12 | (Finit_image_library): Doc fix. | ||
| 13 | |||
| 1 | 2010-10-12 Dan Nicolaescu <dann@ics.uci.edu> | 14 | 2010-10-12 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 15 | ||
| 3 | * Makefile.in (lispsource, libsrc, etc, oldxmenudir, lwlibdir) | 16 | * Makefile.in (lispsource, libsrc, etc, oldxmenudir, lwlibdir) |
diff --git a/src/emacs.c b/src/emacs.c index 95e2f0c0d37..70a0fae4ebf 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -187,6 +187,9 @@ Lisp_Object Vprevious_system_time_locale; | |||
| 187 | Lisp code. */ | 187 | Lisp code. */ |
| 188 | Lisp_Object Vemacs_copyright, Vemacs_version; | 188 | Lisp_Object Vemacs_copyright, Vemacs_version; |
| 189 | 189 | ||
| 190 | /* Alist of external libraries and files implementing them. */ | ||
| 191 | Lisp_Object Vdynamic_library_alist; | ||
| 192 | |||
| 190 | /* If non-zero, emacs should not attempt to use a window-specific code, | 193 | /* If non-zero, emacs should not attempt to use a window-specific code, |
| 191 | but instead should use the virtual terminal under which it was started. */ | 194 | but instead should use the virtual terminal under which it was started. */ |
| 192 | int inhibit_window_system; | 195 | int inhibit_window_system; |
| @@ -2507,6 +2510,24 @@ This is nil during initialization. */); | |||
| 2507 | doc: /* Version numbers of this version of Emacs. */); | 2510 | doc: /* Version numbers of this version of Emacs. */); |
| 2508 | Vemacs_version = build_string (emacs_version); | 2511 | Vemacs_version = build_string (emacs_version); |
| 2509 | 2512 | ||
| 2513 | DEFVAR_LISP ("dynamic-library-alist", &Vdynamic_library_alist, | ||
| 2514 | doc: /* Alist of dynamic libraries vs external files implementing them. | ||
| 2515 | Each element is a list (LIBRARY FILE...), where the car is a symbol | ||
| 2516 | representing a supported external library, and the rest are strings giving | ||
| 2517 | alternate filenames for that library. | ||
| 2518 | |||
| 2519 | Emacs tries to load the library from the files in the order they appear on | ||
| 2520 | the list; if none is loaded, the running session of Emacs won't have access | ||
| 2521 | to that library. | ||
| 2522 | |||
| 2523 | Note that image types `pbm' and `xbm' do not need entries in this variable | ||
| 2524 | because they do not depend on external libraries and are always available. | ||
| 2525 | |||
| 2526 | Also note that this is not a generic facility for accessing external | ||
| 2527 | libraries; only those already known by Emacs will be loaded. */); | ||
| 2528 | Vdynamic_library_alist = Qnil; | ||
| 2529 | Fput (intern_c_string ("dynamic-library-alist"), Qrisky_local_variable, Qt); | ||
| 2530 | |||
| 2510 | /* Make sure IS_DAEMON starts up as false. */ | 2531 | /* Make sure IS_DAEMON starts up as false. */ |
| 2511 | daemon_pipe[1] = 0; | 2532 | daemon_pipe[1] = 0; |
| 2512 | } | 2533 | } |
diff --git a/src/image.c b/src/image.c index 72cbad987f6..4b816ce5f9f 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -567,10 +567,6 @@ static struct image_type *image_types; | |||
| 567 | 567 | ||
| 568 | Lisp_Object Vimage_types; | 568 | Lisp_Object Vimage_types; |
| 569 | 569 | ||
| 570 | /* An alist of image types and libraries that implement the type. */ | ||
| 571 | |||
| 572 | Lisp_Object Vimage_library_alist; | ||
| 573 | |||
| 574 | /* Cache for delayed-loading image types. */ | 570 | /* Cache for delayed-loading image types. */ |
| 575 | 571 | ||
| 576 | static Lisp_Object Vimage_type_cache; | 572 | static Lisp_Object Vimage_type_cache; |
| @@ -645,7 +641,7 @@ lookup_image_type (Lisp_Object symbol) | |||
| 645 | struct image_type *type; | 641 | struct image_type *type; |
| 646 | 642 | ||
| 647 | /* We must initialize the image-type if it hasn't been already. */ | 643 | /* We must initialize the image-type if it hasn't been already. */ |
| 648 | if (NILP (Finit_image_library (symbol, Vimage_library_alist))) | 644 | if (NILP (Finit_image_library (symbol, Vdynamic_library_alist))) |
| 649 | return 0; /* unimplemented */ | 645 | return 0; /* unimplemented */ |
| 650 | 646 | ||
| 651 | for (type = image_types; type; type = type->next) | 647 | for (type = image_types; type; type = type->next) |
| @@ -1923,10 +1919,11 @@ mark_image_cache (struct image_cache *c) | |||
| 1923 | } | 1919 | } |
| 1924 | 1920 | ||
| 1925 | /* Load a DLL implementing an image type. | 1921 | /* Load a DLL implementing an image type. |
| 1926 | The `image-library-alist' variable associates a symbol, | 1922 | The argument LIBRARIES is usually the variable |
| 1927 | identifying an image type, to a list of possible filenames. | 1923 | `dynamic-library-alist', which associates a symbol, identifying |
| 1924 | an external DLL library, to a list of possible filenames. | ||
| 1928 | The function returns NULL if no library could be loaded for | 1925 | The function returns NULL if no library could be loaded for |
| 1929 | the given image type, or if the library was previously loaded; | 1926 | the given symbol, or if the library was previously loaded; |
| 1930 | else the handle of the DLL. */ | 1927 | else the handle of the DLL. */ |
| 1931 | static HMODULE | 1928 | static HMODULE |
| 1932 | w32_delayed_load (Lisp_Object libraries, Lisp_Object type) | 1929 | w32_delayed_load (Lisp_Object libraries, Lisp_Object type) |
| @@ -8583,7 +8580,7 @@ Return non-nil if TYPE is a supported image type. | |||
| 8583 | 8580 | ||
| 8584 | Image types pbm and xbm are prebuilt; other types are loaded here. | 8581 | Image types pbm and xbm are prebuilt; other types are loaded here. |
| 8585 | Libraries to load are specified in alist LIBRARIES (usually, the value | 8582 | Libraries to load are specified in alist LIBRARIES (usually, the value |
| 8586 | of `image-library-alist', which see). */) | 8583 | of `dynamic-library-alist', which see). */) |
| 8587 | (Lisp_Object type, Lisp_Object libraries) | 8584 | (Lisp_Object type, Lisp_Object libraries) |
| 8588 | { | 8585 | { |
| 8589 | Lisp_Object tested; | 8586 | Lisp_Object tested; |
| @@ -8659,20 +8656,6 @@ Each element of the list is a symbol for an image type, like 'jpeg or 'png. | |||
| 8659 | To check whether it is really supported, use `image-type-available-p'. */); | 8656 | To check whether it is really supported, use `image-type-available-p'. */); |
| 8660 | Vimage_types = Qnil; | 8657 | Vimage_types = Qnil; |
| 8661 | 8658 | ||
| 8662 | DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, | ||
| 8663 | doc: /* Alist of image types vs external libraries needed to display them. | ||
| 8664 | |||
| 8665 | Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol | ||
| 8666 | representing a supported image type, and the rest are strings giving | ||
| 8667 | alternate filenames for the corresponding external libraries. | ||
| 8668 | |||
| 8669 | Emacs tries to load the libraries in the order they appear on the | ||
| 8670 | list; if none is loaded, the running session of Emacs won't | ||
| 8671 | support the image type. Types 'pbm and 'xbm don't need to be | ||
| 8672 | listed; they are always supported. */); | ||
| 8673 | Vimage_library_alist = Qnil; | ||
| 8674 | Fput (intern_c_string ("image-library-alist"), Qrisky_local_variable, Qt); | ||
| 8675 | |||
| 8676 | DEFVAR_LISP ("max-image-size", &Vmax_image_size, | 8659 | DEFVAR_LISP ("max-image-size", &Vmax_image_size, |
| 8677 | doc: /* Maximum size of images. | 8660 | doc: /* Maximum size of images. |
| 8678 | Emacs will not load an image into memory if its pixel width or | 8661 | Emacs will not load an image into memory if its pixel width or |
diff --git a/src/lisp.h b/src/lisp.h index a630eeec1f3..c9104f88954 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3300,6 +3300,7 @@ extern Lisp_Object Vbefore_init_time, Vafter_init_time; | |||
| 3300 | extern Lisp_Object Vinstallation_directory; | 3300 | extern Lisp_Object Vinstallation_directory; |
| 3301 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; | 3301 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; |
| 3302 | extern Lisp_Object Qfile_name_handler_alist; | 3302 | extern Lisp_Object Qfile_name_handler_alist; |
| 3303 | extern Lisp_Object Vdynamic_library_alist; | ||
| 3303 | extern void (*fatal_error_signal_hook) (void); | 3304 | extern void (*fatal_error_signal_hook) (void); |
| 3304 | EXFUN (Fkill_emacs, 1) NO_RETURN; | 3305 | EXFUN (Fkill_emacs, 1) NO_RETURN; |
| 3305 | #if HAVE_SETLOCALE | 3306 | #if HAVE_SETLOCALE |