diff options
| author | Rüdiger Sonderfeld | 2014-01-09 18:25:48 +0100 |
|---|---|---|
| committer | Rüdiger Sonderfeld | 2014-01-09 18:25:48 +0100 |
| commit | ec918aabb3f24f37af0db937446d269273a390c3 (patch) | |
| tree | e7dd663fa81e4006a8f827551ee65e7fef4df8eb | |
| parent | fa49b46991ddc7c30c0aa526ad8966bddccc26e1 (diff) | |
| download | emacs-ec918aabb3f24f37af0db937446d269273a390c3.tar.gz emacs-ec918aabb3f24f37af0db937446d269273a390c3.zip | |
Document `load-prefer-newer'.
* doc/emacs/building.texi (Lisp Libraries): Document
`load-prefer-newer'.
It is already documented in lispref.
| -rw-r--r-- | doc/emacs/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/emacs/building.texi | 15 | ||||
| -rw-r--r-- | etc/NEWS | 1 |
3 files changed, 12 insertions, 6 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 3b81e731640..7f0ca7184e2 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2014-01-09 Rüdiger Sonderfeld <ruediger@c-plusplus.de> | 1 | 2014-01-09 Rüdiger Sonderfeld <ruediger@c-plusplus.de> |
| 2 | 2 | ||
| 3 | * building.texi (Lisp Libraries): Document `load-prefer-newer'. | ||
| 4 | |||
| 3 | * files.texi (File Conveniences): Document `image-next-frame', | 5 | * files.texi (File Conveniences): Document `image-next-frame', |
| 4 | `image-previous-frame', `image-goto-frame', | 6 | `image-previous-frame', `image-goto-frame', |
| 5 | `image-increase-speed', `image-decrease-speed', | 7 | `image-increase-speed', `image-decrease-speed', |
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index fdb38bfd4d1..1df4dcdf833 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi | |||
| @@ -1348,6 +1348,7 @@ not from an existing Emacs buffer. | |||
| 1348 | 1348 | ||
| 1349 | @findex load | 1349 | @findex load |
| 1350 | @findex load-library | 1350 | @findex load-library |
| 1351 | @vindex load-prefer-newer | ||
| 1351 | @cindex load path for Emacs Lisp | 1352 | @cindex load path for Emacs Lisp |
| 1352 | If an Emacs Lisp file is installed in the Emacs Lisp @dfn{load path} | 1353 | If an Emacs Lisp file is installed in the Emacs Lisp @dfn{load path} |
| 1353 | (defined below), you can load it by typing @kbd{M-x load-library}, | 1354 | (defined below), you can load it by typing @kbd{M-x load-library}, |
| @@ -1356,15 +1357,17 @@ command prompts for a @dfn{library name} rather than a file name; it | |||
| 1356 | searches through each directory in the Emacs Lisp load path, trying to | 1357 | searches through each directory in the Emacs Lisp load path, trying to |
| 1357 | find a file matching that library name. If the library name is | 1358 | find a file matching that library name. If the library name is |
| 1358 | @samp{@var{foo}}, it tries looking for files named | 1359 | @samp{@var{foo}}, it tries looking for files named |
| 1359 | @file{@var{foo}.elc}, @file{@var{foo}.el}, and lastly just | 1360 | @file{@var{foo}.elc}, @file{@var{foo}.el}, and @file{@var{foo}}. The |
| 1360 | @file{@var{foo}}; the first one found is loaded. This command prefers | 1361 | default behaviour is to load the first file found. This command |
| 1361 | @file{.elc} files over @file{.el} files because compiled files load | 1362 | prefers @file{.elc} files over @file{.el} files because compiled files |
| 1362 | and run faster. If it finds that @file{@var{lib}.el} is newer than | 1363 | load and run faster. If it finds that @file{@var{lib}.el} is newer |
| 1363 | @file{@var{lib}.elc}, it issues a warning, in case someone made | 1364 | than @file{@var{lib}.elc}, it issues a warning, in case someone made |
| 1364 | changes to the @file{.el} file and forgot to recompile it, but loads | 1365 | changes to the @file{.el} file and forgot to recompile it, but loads |
| 1365 | the @file{.elc} file anyway. (Due to this behavior, you can save | 1366 | the @file{.elc} file anyway. (Due to this behavior, you can save |
| 1366 | unfinished edits to Emacs Lisp source files, and not recompile until | 1367 | unfinished edits to Emacs Lisp source files, and not recompile until |
| 1367 | your changes are ready for use.) | 1368 | your changes are ready for use.) However setting |
| 1369 | @code{load-prefer-newer} to a non-@code{nil} value will Emacs load the | ||
| 1370 | newest version of the file found. | ||
| 1368 | 1371 | ||
| 1369 | Emacs Lisp programs usually load Emacs Lisp files using the | 1372 | Emacs Lisp programs usually load Emacs Lisp files using the |
| 1370 | @code{load} function. This is similar to @code{load-library}, but is | 1373 | @code{load} function. This is similar to @code{load-library}, but is |
| @@ -242,6 +242,7 @@ etc. You can customize this to specify a function that provides a | |||
| 242 | default value from the regexp last history element, or from the symbol | 242 | default value from the regexp last history element, or from the symbol |
| 243 | found at point. | 243 | found at point. |
| 244 | 244 | ||
| 245 | +++ | ||
| 245 | *** `load-prefer-newer', affects how the `load' function chooses the | 246 | *** `load-prefer-newer', affects how the `load' function chooses the |
| 246 | file to load. If this is non-nil, then when both .el and .elc | 247 | file to load. If this is non-nil, then when both .el and .elc |
| 247 | versions of a file exist, and the caller did not explicitly specify | 248 | versions of a file exist, and the caller did not explicitly specify |