summaryrefslogtreecommitdiff
path: root/devdocs/elisp/load-suffixes.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/load-suffixes.html
new repository
Diffstat (limited to 'devdocs/elisp/load-suffixes.html')
-rw-r--r--devdocs/elisp/load-suffixes.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/devdocs/elisp/load-suffixes.html b/devdocs/elisp/load-suffixes.html
new file mode 100644
index 00000000..703a0a00
--- /dev/null
+++ b/devdocs/elisp/load-suffixes.html
@@ -0,0 +1,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 &copy; 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>