diff options
| author | Glenn Morris | 2013-12-22 18:54:28 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-12-22 18:54:28 -0800 |
| commit | aec3bf9f49c8c0d0356a0e57f362bd0e23206e7d (patch) | |
| tree | 1968eb7f765b2b67cfe72ab250fabbcb3ebc9413 | |
| parent | bb962da29aed412d70ac4b0b02bb343eb133dc88 (diff) | |
| download | emacs-aec3bf9f49c8c0d0356a0e57f362bd0e23206e7d.tar.gz emacs-aec3bf9f49c8c0d0356a0e57f362bd0e23206e7d.zip | |
Some documenting of load-prefer-newer
* doc/lispref/loading.texi (How Programs Do Loading, Load Suffixes):
Mention `load-prefer-newer'.
* src/lread.c (Fload): Mention load-prefer-newer in doc.
| -rw-r--r-- | doc/lispref/ChangeLog | 16 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 10 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/lread.c | 4 |
4 files changed, 29 insertions, 5 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 96fdb94ca20..dbe148dbcf8 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,6 +1,12 @@ | |||
| 1 | 2013-12-23 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * loading.texi (How Programs Do Loading, Load Suffixes): | ||
| 4 | Mention `load-prefer-newer'. | ||
| 5 | |||
| 1 | 2013-12-22 Xue Fuqiao <xfq.free@gmail.com> | 6 | 2013-12-22 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 7 | ||
| 3 | * hash.texi (Other Hash): Document `hash-table-keys and `hash-table-values'. | 8 | * hash.texi (Other Hash): Document `hash-table-keys' |
| 9 | and `hash-table-values'. | ||
| 4 | 10 | ||
| 5 | 2013-12-22 Eli Zaretskii <eliz@gnu.org> | 11 | 2013-12-22 Eli Zaretskii <eliz@gnu.org> |
| 6 | 12 | ||
| @@ -15,11 +21,11 @@ | |||
| 15 | 21 | ||
| 16 | * text.texi (Examining Properties): Document `get-pos-property'. | 22 | * text.texi (Examining Properties): Document `get-pos-property'. |
| 17 | 23 | ||
| 18 | * variables.texi (Directory Local Variables): Document | 24 | * variables.texi (Directory Local Variables): |
| 19 | `enable-dir-local-variables'. | 25 | Document `enable-dir-local-variables'. |
| 20 | 26 | ||
| 21 | * debugging.texi (Debugger Commands): Document | 27 | * debugging.texi (Debugger Commands): |
| 22 | `debugger-toggle-locals'. | 28 | Document `debugger-toggle-locals'. |
| 23 | 29 | ||
| 24 | 2013-12-21 Chong Yidong <cyd@gnu.org> | 30 | 2013-12-21 Chong Yidong <cyd@gnu.org> |
| 25 | 31 | ||
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 48866a10687..d1bcfd26a0b 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi | |||
| @@ -93,6 +93,10 @@ If the optional argument @var{must-suffix} is non-@code{nil}, then | |||
| 93 | @samp{.el} or @samp{.elc} (possibly extended with a compression | 93 | @samp{.el} or @samp{.elc} (possibly extended with a compression |
| 94 | suffix), unless it contains an explicit directory name. | 94 | suffix), unless it contains an explicit directory name. |
| 95 | 95 | ||
| 96 | If the option @code{load-prefer-newer} is non-@code{nil}, then when | ||
| 97 | searching suffixes, @code{load} selects whichever version of a file | ||
| 98 | (@samp{.elc}, @samp{.el}, etc.) has been modified most recently. | ||
| 99 | |||
| 96 | If @var{filename} is a relative file name, such as @file{foo} or | 100 | If @var{filename} is a relative file name, such as @file{foo} or |
| 97 | @file{baz/foo.bar}, @code{load} searches for the file using the variable | 101 | @file{baz/foo.bar}, @code{load} searches for the file using the variable |
| 98 | @code{load-path}. It appends @var{filename} to each of the directories | 102 | @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 | |||
| 246 | it skips the former group, and if @var{must-suffix} is non-@code{nil}, | 250 | it skips the former group, and if @var{must-suffix} is non-@code{nil}, |
| 247 | it skips the latter group. | 251 | it skips the latter group. |
| 248 | 252 | ||
| 253 | @defopt load-prefer-newer | ||
| 254 | If this option is non-@code{nil}, then rather than stopping at the | ||
| 255 | first suffix that exists, @code{load} tests them all, and uses | ||
| 256 | whichever file is the newest. | ||
| 257 | @end defopt | ||
| 258 | |||
| 249 | @node Library Search | 259 | @node Library Search |
| 250 | @section Library Search | 260 | @section Library Search |
| 251 | @cindex library search | 261 | @cindex library search |
diff --git a/src/ChangeLog b/src/ChangeLog index 6e0a01bcbae..8a521a585b6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-12-23 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * lread.c (Fload): Mention load-prefer-newer in doc. | ||
| 4 | |||
| 1 | 2013-12-22 Martin Rudalics <rudalics@gmx.at> | 5 | 2013-12-22 Martin Rudalics <rudalics@gmx.at> |
| 2 | 6 | ||
| 3 | Handle Bug#16207 by being more restrictive when running hooks. | 7 | Handle Bug#16207 by being more restrictive when running hooks. |
diff --git a/src/lread.c b/src/lread.c index 1db3a47ef0a..a6181b0cb85 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1029,6 +1029,10 @@ in `load-file-rep-suffixes'. If MUST-SUFFIX is non-nil, only the | |||
| 1029 | return value of `get-load-suffixes' is used, i.e. the file name is | 1029 | return value of `get-load-suffixes' is used, i.e. the file name is |
| 1030 | required to have a non-empty suffix. | 1030 | required to have a non-empty suffix. |
| 1031 | 1031 | ||
| 1032 | When searching suffixes, this function normally stops at the first | ||
| 1033 | one that exists. If the option `load-prefer-newer' is non-nil, | ||
| 1034 | however, it tries all suffixes, and uses whichever file is the newest. | ||
| 1035 | |||
| 1032 | Loading a file records its definitions, and its `provide' and | 1036 | Loading a file records its definitions, and its `provide' and |
| 1033 | `require' calls, in an element of `load-history' whose | 1037 | `require' calls, in an element of `load-history' whose |
| 1034 | car is the file name loaded. See `load-history'. | 1038 | car is the file name loaded. See `load-history'. |