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 | |
| 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.
| -rw-r--r-- | etc/ChangeLog | 4 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/image.el | 6 | ||||
| -rw-r--r-- | lisp/term/w32-win.el | 6 | ||||
| -rw-r--r-- | nt/ChangeLog | 4 | ||||
| -rw-r--r-- | nt/INSTALL | 2 | ||||
| -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 |
11 files changed, 70 insertions, 29 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index 766929b42b5..037c9eab266 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-13 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * NEWS: Mention `dynamic-library-alist'. | ||
| 4 | |||
| 1 | 2010-10-13 Glenn Morris <rgm@gnu.org> | 5 | 2010-10-13 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * NEXTSTEP: New file, extracted from ../nextstep/{AUTHORS,README}. | 7 | * NEXTSTEP: New file, extracted from ../nextstep/{AUTHORS,README}. |
| @@ -578,6 +578,11 @@ sc.el, x-menu.el, rnews.el, rnewspost.el | |||
| 578 | 578 | ||
| 579 | * Lisp changes in Emacs 24.1 | 579 | * Lisp changes in Emacs 24.1 |
| 580 | 580 | ||
| 581 | ** `image-library-alist' is renamed to `dynamic-library-alist'. | ||
| 582 | The variable is now used to load all kind of supported dynamic libraries, | ||
| 583 | not just image libraries. The previous name is still available as an | ||
| 584 | obsolete alias. | ||
| 585 | |||
| 581 | ** New variable syntax-propertize-function to set syntax-table properties. | 586 | ** New variable syntax-propertize-function to set syntax-table properties. |
| 582 | Replaces font-lock-syntactic-keywords which are now obsolete. | 587 | Replaces font-lock-syntactic-keywords which are now obsolete. |
| 583 | This allows syntax-table properties to be set independently from font-lock: | 588 | This allows syntax-table properties to be set independently from font-lock: |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 39b5f3c0137..190feab75bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2010-10-13 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * image.el (image-library-alist): Declare as obsolete alias. | ||
| 4 | (image-type-available-p): Use `dynamic-library-alist'. | ||
| 5 | |||
| 6 | * term/w32-win.el (dynamic-library-alist): | ||
| 7 | Use instead of `image-library-alist'. | ||
| 8 | |||
| 1 | 2010-10-13 IRIE Shinsuke <irieshinsuke@yahoo.co.jp> (tiny change) | 9 | 2010-10-13 IRIE Shinsuke <irieshinsuke@yahoo.co.jp> (tiny change) |
| 2 | 10 | ||
| 3 | * subr.el (last): Make it faster. (Bug#7174) | 11 | * subr.el (last): Make it faster. (Bug#7174) |
diff --git a/lisp/image.el b/lisp/image.el index 8dd88f627a1..0afdc71cb9e 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -330,14 +330,16 @@ Optional DATA-P non-nil means SOURCE is a string containing image data." | |||
| 330 | type) | 330 | type) |
| 331 | 331 | ||
| 332 | 332 | ||
| 333 | (defvar image-library-alist) | 333 | (define-obsolete-variable-alias |
| 334 | 'image-library-alist | ||
| 335 | 'dynamic-library-alist "24.1") | ||
| 334 | 336 | ||
| 335 | ;;;###autoload | 337 | ;;;###autoload |
| 336 | (defun image-type-available-p (type) | 338 | (defun image-type-available-p (type) |
| 337 | "Return non-nil if image type TYPE is available. | 339 | "Return non-nil if image type TYPE is available. |
| 338 | Image types are symbols like `xbm' or `jpeg'." | 340 | Image types are symbols like `xbm' or `jpeg'." |
| 339 | (and (fboundp 'init-image-library) | 341 | (and (fboundp 'init-image-library) |
| 340 | (init-image-library type image-library-alist))) | 342 | (init-image-library type dynamic-library-alist))) |
| 341 | 343 | ||
| 342 | 344 | ||
| 343 | ;;;###autoload | 345 | ;;;###autoload |
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 1779d1025e0..54bb5a5027b 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el | |||
| @@ -196,10 +196,10 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") | |||
| 196 | "Report an error when a suspend is attempted." | 196 | "Report an error when a suspend is attempted." |
| 197 | (error "Suspending an Emacs running under W32 makes no sense")) | 197 | (error "Suspending an Emacs running under W32 makes no sense")) |
| 198 | 198 | ||
| 199 | (defvar image-library-alist) | 199 | (defvar dynamic-library-alist) |
| 200 | 200 | ||
| 201 | ;;; Set default known names for image libraries | 201 | ;;; Set default known names for external libraries |
| 202 | (setq image-library-alist | 202 | (setq dynamic-library-alist |
| 203 | '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") | 203 | '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") |
| 204 | (png "libpng12d.dll" "libpng12.dll" "libpng.dll" | 204 | (png "libpng12d.dll" "libpng12.dll" "libpng.dll" |
| 205 | ;; these are libpng 1.2.8 from GTK+ | 205 | ;; these are libpng 1.2.8 from GTK+ |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 5f92bedd8c1..44d937e4db9 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-13 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * INSTALL: Refer to `dynamic-library-alist'. | ||
| 4 | |||
| 1 | 2010-10-06 Juanma Barranquero <lekktu@gmail.com> | 5 | 2010-10-06 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * INSTALL: Add note about problematic characters passed to configure. | 7 | * INSTALL: Add note about problematic characters passed to configure. |
diff --git a/nt/INSTALL b/nt/INSTALL index c26ab196bd2..357cc8d0a8e 100644 --- a/nt/INSTALL +++ b/nt/INSTALL | |||
| @@ -266,7 +266,7 @@ | |||
| 266 | library is not an error; the associated image format will simply be | 266 | library is not an error; the associated image format will simply be |
| 267 | unavailable. Note that once Emacs has determined that a library can | 267 | unavailable. Note that once Emacs has determined that a library can |
| 268 | not be found, there's no way to force it to try again, other than | 268 | not be found, there's no way to force it to try again, other than |
| 269 | restarting. See the variable `image-library-alist' to configure the | 269 | restarting. See the variable `dynamic-library-alist' to configure the |
| 270 | expected names of the libraries. | 270 | expected names of the libraries. |
| 271 | 271 | ||
| 272 | Some image libraries have dependencies on one another, or on zlib. | 272 | Some image libraries have dependencies on one another, or on zlib. |
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 |