]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/loading.texi
Merge from emacs-24
[gnu-emacs] / doc / lispref / loading.texi
index aae92de99cb09e50ff719fd291d21cacae2589cf..a07c2e8a79297b6ff59b7c706a63d87b0d28098b 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2013 Free Software
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2014 Free Software
 @c Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @node Loading
@@ -93,6 +93,10 @@ If the optional argument @var{must-suffix} is non-@code{nil}, then
 @samp{.el} or @samp{.elc} (possibly extended with a compression
 suffix), unless it contains an explicit directory name.
 
+If the option @code{load-prefer-newer} is non-@code{nil}, then when
+searching suffixes, @code{load} selects whichever version of a file
+(@samp{.elc}, @samp{.el}, etc.) has been modified most recently.
+
 If @var{filename} is a relative file name, such as @file{foo} or
 @file{baz/foo.bar}, @code{load} searches for the file using the variable
 @code{load-path}.  It appends @var{filename} to each of the directories
@@ -246,6 +250,12 @@ value of @code{(get-load-suffixes)} and then those in
 it skips the former group, and if @var{must-suffix} is non-@code{nil},
 it skips the latter group.
 
+@defopt load-prefer-newer
+If this option is non-@code{nil}, then rather than stopping at the
+first suffix that exists, @code{load} tests them all, and uses
+whichever file is the newest.
+@end defopt
+
 @node Library Search
 @section Library Search
 @cindex library search
@@ -270,7 +280,6 @@ is a directory something like
 "/usr/local/share/emacs/@var{version}/lisp"
 @end example
 
-followed by a similarly named @file{leim} directory.
 (In this and the following examples, replace @file{/usr/local} with
 the installation prefix appropriate for your Emacs.)
 These directories contain the standard Lisp files that come with
@@ -278,10 +287,12 @@ Emacs.  If Emacs cannot find them, it will not start correctly.
 
 If you run Emacs from the directory where it was built---that is, an
 executable that has not been formally installed---Emacs instead
-initializes @code{load-path} using the @file{lisp} and @file{leim}
-directories in the directory containing the sources from which it
-was built.  If you built Emacs in a separate directory from the
-sources, it also adds those directories from the build directory.
+initializes @code{load-path} using the @file{lisp}
+directory in the directory containing the sources from which it
+was built.
+@c Though there should be no *.el files in builddir/lisp, so it's pointless.
+If you built Emacs in a separate directory from the
+sources, it also adds the lisp directories from the build directory.
 (In all cases, elements are represented as absolute file names.)
 
 @cindex site-lisp directories
@@ -360,12 +371,10 @@ add one or more directories to @code{load-path}.  For example:
 (push "~/.emacs.d/lisp" load-path)
 @end example
 
-  Dumping Emacs uses a special value of @code{load-path}.  If the
-value of @code{load-path} at the end of dumping is unchanged (that is,
-still the same special value), the dumped Emacs switches to the
-ordinary @code{load-path} value when it starts up, as described above.
-But if @code{load-path} has any other value at the end of dumping,
-that value is used for execution of the dumped Emacs also.
+  Dumping Emacs uses a special value of @code{load-path}.  If you use
+a @file{site-load.el} or @file{site-init.el} file to customize the
+dumped Emacs (@pxref{Building Emacs}), any changes to @code{load-path}
+that these files make will be lost after dumping.
 
 @deffn Command locate-library library &optional nosuffix path interactive-call
 This command finds the precise file name for library @var{library}.  It