aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/loading.texi
diff options
context:
space:
mode:
Diffstat (limited to 'lispref/loading.texi')
-rw-r--r--lispref/loading.texi39
1 files changed, 21 insertions, 18 deletions
diff --git a/lispref/loading.texi b/lispref/loading.texi
index 092befff85a..058ed9c8984 100644
--- a/lispref/loading.texi
+++ b/lispref/loading.texi
@@ -64,22 +64,23 @@ forms in it, and closes the file.
64 64
65To find the file, @code{load} first looks for a file named 65To find the file, @code{load} first looks for a file named
66@file{@var{filename}.elc}, that is, for a file whose name is 66@file{@var{filename}.elc}, that is, for a file whose name is
67@var{filename} with @samp{.elc} appended. If such a file exists, it is 67@var{filename} with the extension @samp{.elc} appended. If such a
68loaded. If there is no file by that name, then @code{load} looks for a 68file exists, it is loaded. If there is no file by that name, then
69file named @file{@var{filename}.el}. If that file exists, it is loaded. 69@code{load} looks for a file named @file{@var{filename}.el}. If that
70Finally, if neither of those names is found, @code{load} looks for a 70file exists, it is loaded. Finally, if neither of those names is
71file named @var{filename} with nothing appended, and loads it if it 71found, @code{load} looks for a file named @var{filename} with nothing
72exists. (The @code{load} function is not clever about looking at 72appended, and loads it if it exists. (The @code{load} function is not
73@var{filename}. In the perverse case of a file named @file{foo.el.el}, 73clever about looking at @var{filename}. In the perverse case of a
74evaluation of @code{(load "foo.el")} will indeed find it.) 74file named @file{foo.el.el}, evaluation of @code{(load "foo.el")} will
75 75indeed find it.)
76If Auto Compression mode is enabled, as it is by default, then 76
77if @code{load} can not find a file, it searches for a compressed 77If Auto Compression mode is enabled, as it is by default, then if
78version of the file before trying other file names. It decompresses 78@code{load} can not find a file, it searches for a compressed version
79and loads it if it exists. It looks for compressed versions by 79of the file before trying other file names. It decompresses and loads
80appending the suffixes in @code{jka-compr-load-suffixes} to the file 80it if it exists. It looks for compressed versions by appending each
81name. The value of this variable must be a list of strings. Its 81of the suffixes in @code{jka-compr-load-suffixes} to the file name.
82standard value is @code{(".gz")}. 82The value of this variable must be a list of strings. Its standard
83value is @code{(".gz")}.
83 84
84If the optional argument @var{nosuffix} is non-@code{nil}, then 85If the optional argument @var{nosuffix} is non-@code{nil}, then
85@code{load} does not try the suffixes @samp{.elc} and @samp{.el}. In 86@code{load} does not try the suffixes @samp{.elc} and @samp{.el}. In
@@ -220,6 +221,8 @@ it skips the latter group.
220 221
221@node Library Search 222@node Library Search
222@section Library Search 223@section Library Search
224@cindex library search
225@cindex find library
223 226
224 When Emacs loads a Lisp library, it searches for the library 227 When Emacs loads a Lisp library, it searches for the library
225in a list of directories specified by the variable @code{load-path}. 228in a list of directories specified by the variable @code{load-path}.
@@ -844,7 +847,7 @@ rather than replacing that element. @xref{Eval}.
844 847
845@node Unloading 848@node Unloading
846@section Unloading 849@section Unloading
847@cindex unloading 850@cindex unloading packages
848 851
849@c Emacs 19 feature 852@c Emacs 19 feature
850 You can discard the functions and variables loaded by a library to 853 You can discard the functions and variables loaded by a library to
@@ -956,7 +959,7 @@ element looks like this:
956 959
957The key @var{regexp-or-feature} is either a regular expression or a 960The key @var{regexp-or-feature} is either a regular expression or a
958symbol, and the value is a list of forms. The forms are evaluated when 961symbol, and the value is a list of forms. The forms are evaluated when
959the key matches the the absolute true name of the file being 962the key matches the absolute true name of the file being
960@code{load}ed or the symbol being @code{provide}d. 963@code{load}ed or the symbol being @code{provide}d.
961@end defvar 964@end defvar
962 965