aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2010-10-13 16:50:06 +0200
committerJuanma Barranquero2010-10-13 16:50:06 +0200
commit2e288d54f05ba6e72a227ed3857a8098ca585b50 (patch)
tree721182610fc404c5469c5dcf6375b0b95692fad5
parentd0e0de31a6628cd38c69f555aebab0a49ff64418 (diff)
downloademacs-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/ChangeLog4
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/image.el6
-rw-r--r--lisp/term/w32-win.el6
-rw-r--r--nt/ChangeLog4
-rw-r--r--nt/INSTALL2
-rw-r--r--src/ChangeLog13
-rw-r--r--src/emacs.c21
-rw-r--r--src/image.c29
-rw-r--r--src/lisp.h1
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 @@
12010-10-13 Juanma Barranquero <lekktu@gmail.com>
2
3 * NEWS: Mention `dynamic-library-alist'.
4
12010-10-13 Glenn Morris <rgm@gnu.org> 52010-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}.
diff --git a/etc/NEWS b/etc/NEWS
index 7ee81f9b81d..d9d84b9ce19 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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'.
582The variable is now used to load all kind of supported dynamic libraries,
583not just image libraries. The previous name is still available as an
584obsolete alias.
585
581** New variable syntax-propertize-function to set syntax-table properties. 586** New variable syntax-propertize-function to set syntax-table properties.
582Replaces font-lock-syntactic-keywords which are now obsolete. 587Replaces font-lock-syntactic-keywords which are now obsolete.
583This allows syntax-table properties to be set independently from font-lock: 588This 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 @@
12010-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
12010-10-13 IRIE Shinsuke <irieshinsuke@yahoo.co.jp> (tiny change) 92010-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.
338Image types are symbols like `xbm' or `jpeg'." 340Image 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 @@
12010-10-13 Juanma Barranquero <lekktu@gmail.com>
2
3 * INSTALL: Refer to `dynamic-library-alist'.
4
12010-10-06 Juanma Barranquero <lekktu@gmail.com> 52010-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 @@
12010-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
12010-10-12 Dan Nicolaescu <dann@ics.uci.edu> 142010-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. */
188Lisp_Object Vemacs_copyright, Vemacs_version; 188Lisp_Object Vemacs_copyright, Vemacs_version;
189 189
190/* Alist of external libraries and files implementing them. */
191Lisp_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. */
192int inhibit_window_system; 195int 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.
2515Each element is a list (LIBRARY FILE...), where the car is a symbol
2516representing a supported external library, and the rest are strings giving
2517alternate filenames for that library.
2518
2519Emacs tries to load the library from the files in the order they appear on
2520the list; if none is loaded, the running session of Emacs won't have access
2521to that library.
2522
2523Note that image types `pbm' and `xbm' do not need entries in this variable
2524because they do not depend on external libraries and are always available.
2525
2526Also note that this is not a generic facility for accessing external
2527libraries; 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
568Lisp_Object Vimage_types; 568Lisp_Object Vimage_types;
569 569
570/* An alist of image types and libraries that implement the type. */
571
572Lisp_Object Vimage_library_alist;
573
574/* Cache for delayed-loading image types. */ 570/* Cache for delayed-loading image types. */
575 571
576static Lisp_Object Vimage_type_cache; 572static 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. */
1931static HMODULE 1928static HMODULE
1932w32_delayed_load (Lisp_Object libraries, Lisp_Object type) 1929w32_delayed_load (Lisp_Object libraries, Lisp_Object type)
@@ -8583,7 +8580,7 @@ Return non-nil if TYPE is a supported image type.
8583 8580
8584Image types pbm and xbm are prebuilt; other types are loaded here. 8581Image types pbm and xbm are prebuilt; other types are loaded here.
8585Libraries to load are specified in alist LIBRARIES (usually, the value 8582Libraries to load are specified in alist LIBRARIES (usually, the value
8586of `image-library-alist', which see). */) 8583of `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.
8659To check whether it is really supported, use `image-type-available-p'. */); 8656To 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
8665Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
8666representing a supported image type, and the rest are strings giving
8667alternate filenames for the corresponding external libraries.
8668
8669Emacs tries to load the libraries in the order they appear on the
8670list; if none is loaded, the running session of Emacs won't
8671support the image type. Types 'pbm and 'xbm don't need to be
8672listed; 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.
8678Emacs will not load an image into memory if its pixel width or 8661Emacs 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;
3300extern Lisp_Object Vinstallation_directory; 3300extern Lisp_Object Vinstallation_directory;
3301extern Lisp_Object empty_unibyte_string, empty_multibyte_string; 3301extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
3302extern Lisp_Object Qfile_name_handler_alist; 3302extern Lisp_Object Qfile_name_handler_alist;
3303extern Lisp_Object Vdynamic_library_alist;
3303extern void (*fatal_error_signal_hook) (void); 3304extern void (*fatal_error_signal_hook) (void);
3304EXFUN (Fkill_emacs, 1) NO_RETURN; 3305EXFUN (Fkill_emacs, 1) NO_RETURN;
3305#if HAVE_SETLOCALE 3306#if HAVE_SETLOCALE