1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<h3 class="section">Load Suffixes</h3> <p>We now describe some technical details about the exact suffixes that <code>load</code> tries. </p> <dl> <dt id="load-suffixes">Variable: <strong>load-suffixes</strong>
</dt> <dd><p>This is a list of suffixes indicating (compiled or source) Emacs Lisp files. It should not include the empty string. <code>load</code> uses these suffixes in order when it appends Lisp suffixes to the specified file name. The standard value is <code>(".elc" ".el")</code> which produces the behavior described in the previous section. </p></dd>
</dl> <dl> <dt id="load-file-rep-suffixes">Variable: <strong>load-file-rep-suffixes</strong>
</dt> <dd>
<p>This is a list of suffixes that indicate representations of the same file. This list should normally start with the empty string. When <code>load</code> searches for a file it appends the suffixes in this list, in order, to the file name, before searching for another file. </p> <p>Enabling Auto Compression mode appends the suffixes in <code>jka-compr-load-suffixes</code> to this list and disabling Auto Compression mode removes them again. The standard value of <code>load-file-rep-suffixes</code> if Auto Compression mode is disabled is <code>("")</code>. Given that the standard value of <code>jka-compr-load-suffixes</code> is <code>(".gz")</code>, the standard value of <code>load-file-rep-suffixes</code> if Auto Compression mode is enabled is <code>("" ".gz")</code>. </p>
</dd>
</dl> <dl> <dt id="get-load-suffixes">Function: <strong>get-load-suffixes</strong>
</dt> <dd><p>This function returns the list of all suffixes that <code>load</code> should try, in order, when its <var>must-suffix</var> argument is non-<code>nil</code>. This takes both <code>load-suffixes</code> and <code>load-file-rep-suffixes</code> into account. If <code>load-suffixes</code>, <code>jka-compr-load-suffixes</code> and <code>load-file-rep-suffixes</code> all have their standard values, this function returns <code>(".elc" ".elc.gz" ".el" ".el.gz")</code> if Auto Compression mode is enabled and <code>(".elc" ".el")</code> if Auto Compression mode is disabled. </p></dd>
</dl> <p>To summarize, <code>load</code> normally first tries the suffixes in the value of <code>(get-load-suffixes)</code> and then those in <code>load-file-rep-suffixes</code>. If <var>nosuffix</var> is non-<code>nil</code>, it skips the former group, and if <var>must-suffix</var> is non-<code>nil</code>, it skips the latter group. </p> <dl> <dt id="load-prefer-newer">User Option: <strong>load-prefer-newer</strong>
</dt> <dd><p>If this option is non-<code>nil</code>, then rather than stopping at the first suffix that exists, <code>load</code> tests them all, and uses whichever file is the newest. </p></dd>
</dl><div class="_attribution">
<p class="_attribution-p">
Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
<a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Load-Suffixes.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Load-Suffixes.html</a>
</p>
</div>
|