aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/loading.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/loading.texi')
-rw-r--r--doc/lispref/loading.texi22
1 files changed, 13 insertions, 9 deletions
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index cb5c7012c16..06900a49477 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -73,12 +73,15 @@ To find the file, @code{load} first looks for a file named
73@var{filename} with the extension @samp{.elc} appended. If such a 73@var{filename} with the extension @samp{.elc} appended. If such a
74file exists, it is loaded. If there is no file by that name, then 74file exists, it is loaded. If there is no file by that name, then
75@code{load} looks for a file named @file{@var{filename}.el}. If that 75@code{load} looks for a file named @file{@var{filename}.el}. If that
76file exists, it is loaded. Finally, if neither of those names is 76file exists, it is loaded. If Emacs was compiled with support for
77found, @code{load} looks for a file named @var{filename} with nothing 77dynamic modules (@pxref{Dynamic Modules}), @code{load} next looks for
78appended, and loads it if it exists. (The @code{load} function is not 78a file named @file{@var{filename}.@var{ext}}, where @var{ext} is a
79clever about looking at @var{filename}. In the perverse case of a 79system-dependent file-name extension of shared libraries. Finally, if
80file named @file{foo.el.el}, evaluation of @code{(load "foo.el")} will 80neither of those names is found, @code{load} looks for a file named
81indeed find it.) 81@var{filename} with nothing appended, and loads it if it exists. (The
82@code{load} function is not clever about looking at @var{filename}.
83In the perverse case of a file named @file{foo.el.el}, evaluation of
84@code{(load "foo.el")} will indeed find it.)
82 85
83If Auto Compression mode is enabled, as it is by default, then if 86If Auto Compression mode is enabled, as it is by default, then if
84@code{load} can not find a file, it searches for a compressed version 87@code{load} can not find a file, it searches for a compressed version
@@ -100,7 +103,8 @@ being tried.
100If the optional argument @var{must-suffix} is non-@code{nil}, then 103If the optional argument @var{must-suffix} is non-@code{nil}, then
101@code{load} insists that the file name used must end in either 104@code{load} insists that the file name used must end in either
102@samp{.el} or @samp{.elc} (possibly extended with a compression 105@samp{.el} or @samp{.elc} (possibly extended with a compression
103suffix), unless it contains an explicit directory name. 106suffix) or the shared-library extension, unless it contains an
107explicit directory name.
104 108
105If the option @code{load-prefer-newer} is non-@code{nil}, then when 109If the option @code{load-prefer-newer} is non-@code{nil}, then when
106searching suffixes, @code{load} selects whichever version of a file 110searching suffixes, @code{load} selects whichever version of a file
@@ -202,8 +206,8 @@ This variable specifies an alternate expression-reading function for
202@code{load} and @code{eval-region} to use instead of @code{read}. 206@code{load} and @code{eval-region} to use instead of @code{read}.
203The function should accept one argument, just as @code{read} does. 207The function should accept one argument, just as @code{read} does.
204 208
205Normally, the variable's value is @code{nil}, which means those 209By default, this variable's value is @code{read}. @xref{Input
206functions should use @code{read}. 210Functions}.
207 211
208Instead of using this variable, it is cleaner to use another, newer 212Instead of using this variable, it is cleaner to use another, newer
209feature: to pass the function as the @var{read-function} argument to 213feature: to pass the function as the @var{read-function} argument to