diff options
Diffstat (limited to 'lispref/loading.texi')
| -rw-r--r-- | lispref/loading.texi | 39 |
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 | ||
| 65 | To find the file, @code{load} first looks for a file named | 65 | To 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 |
| 68 | loaded. If there is no file by that name, then @code{load} looks for a | 68 | file exists, it is loaded. If there is no file by that name, then |
| 69 | file 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 |
| 70 | Finally, if neither of those names is found, @code{load} looks for a | 70 | file exists, it is loaded. Finally, if neither of those names is |
| 71 | file named @var{filename} with nothing appended, and loads it if it | 71 | found, @code{load} looks for a file named @var{filename} with nothing |
| 72 | exists. (The @code{load} function is not clever about looking at | 72 | appended, 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}, | 73 | clever about looking at @var{filename}. In the perverse case of a |
| 74 | evaluation of @code{(load "foo.el")} will indeed find it.) | 74 | file named @file{foo.el.el}, evaluation of @code{(load "foo.el")} will |
| 75 | 75 | indeed find it.) | |
| 76 | If Auto Compression mode is enabled, as it is by default, then | 76 | |
| 77 | if @code{load} can not find a file, it searches for a compressed | 77 | If Auto Compression mode is enabled, as it is by default, then if |
| 78 | version of the file before trying other file names. It decompresses | 78 | @code{load} can not find a file, it searches for a compressed version |
| 79 | and loads it if it exists. It looks for compressed versions by | 79 | of the file before trying other file names. It decompresses and loads |
| 80 | appending the suffixes in @code{jka-compr-load-suffixes} to the file | 80 | it if it exists. It looks for compressed versions by appending each |
| 81 | name. The value of this variable must be a list of strings. Its | 81 | of the suffixes in @code{jka-compr-load-suffixes} to the file name. |
| 82 | standard value is @code{(".gz")}. | 82 | The value of this variable must be a list of strings. Its standard |
| 83 | value is @code{(".gz")}. | ||
| 83 | 84 | ||
| 84 | If the optional argument @var{nosuffix} is non-@code{nil}, then | 85 | If 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 |
| 225 | in a list of directories specified by the variable @code{load-path}. | 228 | in 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 | ||
| 957 | The key @var{regexp-or-feature} is either a regular expression or a | 960 | The key @var{regexp-or-feature} is either a regular expression or a |
| 958 | symbol, and the value is a list of forms. The forms are evaluated when | 961 | symbol, and the value is a list of forms. The forms are evaluated when |
| 959 | the key matches the the absolute true name of the file being | 962 | the 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 | ||