Merge from emacs-23
[bpt/emacs.git] / doc / lispref / os.texi
index fea5e35..e5df6d9 100644 (file)
@@ -5,7 +5,7 @@
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/os
-@node System Interface, Antinews, Display, Top
+@node System Interface, Packaging, Display, Top
 @chapter Operating System Interface
 
   This chapter is about starting and getting out of Emacs, access to
@@ -37,6 +37,7 @@ terminal and the screen.
 * X11 Keysyms::         Operating on key symbols for X Windows.
 * Batch Mode::          Running Emacs without terminal interaction.
 * Session Management::  Saving and restoring state with X Session Management.
+* Dynamic Libraries::   On-demand loading of support libraries.
 @end menu
 
 @node Starting Up
@@ -577,7 +578,6 @@ does not run the remaining functions in this hook.  Calling
 This variable is a normal hook; once @code{save-buffers-kill-emacs} is
 finished with all file saving and confirmation, it calls
 @code{kill-emacs} which runs the functions in this hook.
-@code{kill-emacs} does not run this hook in batch mode.
 
 @code{kill-emacs} may be invoked directly (that is not via
 @code{save-buffers-kill-emacs}) if the terminal is disconnected, or in
@@ -787,9 +787,6 @@ Hewlett-Packard HPUX operating system.
 @item irix
 Silicon Graphics Irix system.
 
-@item lynxos 3.0.1
-LynxOS-3.0.1.
-
 @item ms-dos
 Microsoft MS-DOS ``operating system.''  Emacs compiled with DJGPP for
 MS-DOS binds @code{system-type} to @code{ms-dos} even when you run it on
@@ -2190,6 +2187,57 @@ Emacs is restarted by the session manager.
 @end group
 @end example
 
+@node Dynamic Libraries
+@section Dynamically Loaded Libraries
+@cindex dynamic libraries
+
+  A @dfn{dynamically loaded library} is a library that is loaded on
+demand, when its facilities are first needed.  Emacs supports such
+on-demand loading of support libraries for some of its features.
+
+@defvar dynamic-library-alist
+This is an alist of dynamic libraries and external library files
+implementing them.
+
+Each element is a list of the form
+@w{@code{(@var{library} @var{files}@dots{})}}, where the @code{car} is
+a symbol representing a supported external library, and the rest are
+strings giving alternate filenames for that library.
+
+Emacs tries to load the library from the files in the order they
+appear in the list; if none is found, the running session of Emacs
+won't have access to that library, and the features that depend on the
+library will be unavailable.
+
+Image support on some platforms uses this facility.  Here's an example
+of setting this variable for supporting images on MS-Windows:
+
+@lisp
+(setq dynamic-library-alist
+      '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll")
+        (png "libpng12d.dll" "libpng12.dll" "libpng.dll"
+        "libpng13d.dll" "libpng13.dll")
+        (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")
+        (tiff "libtiff3.dll" "libtiff.dll")
+        (gif "giflib4.dll" "libungif4.dll" "libungif.dll")
+        (svg "librsvg-2-2.dll")
+        (gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
+        (glib "libglib-2.0-0.dll")
+       (gobject "libgobject-2.0-0.dll")))
+@end lisp
+
+Note that image types @code{pbm} and @code{xbm} do not need entries in
+this variable because they do not depend on external libraries and are
+always available in Emacs.
+
+Also note that this variable is not meant to be a generic facility for
+accessing external libraries; only those already known by Emacs can
+be loaded through it.
+
+This variable is ignored if the given @var{library} is statically
+linked into Emacs.
+@end defvar
+
 @ignore
    arch-tag: 8378814a-30d7-467c-9615-74a80b9988a7
 @end ignore