]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/loading.texi
Transform mentions of `eval-after-load' to `with-eval-after-load'
[gnu-emacs] / doc / lispref / loading.texi
index 2893a6dbff9d67c5c43a963a3cf0a35d92f7f1e9..d2d38d7fb5ef3122d1a1b33e32ba0c7bd2c7e9ba 100644 (file)
@@ -73,12 +73,15 @@ To find the file, @code{load} first looks for a file named
 @var{filename} with the extension @samp{.elc} appended.  If such a
 file exists, it is loaded.  If there is no file by that name, then
 @code{load} looks for a file named @file{@var{filename}.el}.  If that
-file exists, it is loaded.  Finally, if neither of those names is
-found, @code{load} looks for a file named @var{filename} with nothing
-appended, and loads it if it exists.  (The @code{load} function is not
-clever about looking at @var{filename}.  In the perverse case of a
-file named @file{foo.el.el}, evaluation of @code{(load "foo.el")} will
-indeed find it.)
+file exists, it is loaded.  If Emacs was compiled with support for
+dynamic modules (@pxref{Dynamic Modules}), @code{load} next looks for
+a file named @file{@var{filename}.@var{ext}}, where @var{ext} is a
+system-dependent file-name extension of shared libraries.  Finally, if
+neither of those names is found, @code{load} looks for a file named
+@var{filename} with nothing appended, and loads it if it exists.  (The
+@code{load} function is not clever about looking at @var{filename}.
+In the perverse case of a file named @file{foo.el.el}, evaluation of
+@code{(load "foo.el")} will indeed find it.)
 
 If Auto Compression mode is enabled, as it is by default, then if
 @code{load} can not find a file, it searches for a compressed version
@@ -100,7 +103,8 @@ being tried.
 If the optional argument @var{must-suffix} is non-@code{nil}, then
 @code{load} insists that the file name used must end in either
 @samp{.el} or @samp{.elc} (possibly extended with a compression
-suffix), unless it contains an explicit directory name.
+suffix) or the shared-library extension, unless it contains an
+explicit directory name.
 
 If the option @code{load-prefer-newer} is non-@code{nil}, then when
 searching suffixes, @code{load} selects whichever version of a file
@@ -202,8 +206,8 @@ This variable specifies an alternate expression-reading function for
 @code{load} and @code{eval-region} to use instead of @code{read}.
 The function should accept one argument, just as @code{read} does.
 
-Normally, the variable's value is @code{nil}, which means those
-functions should use @code{read}.
+By default, this variable's value is @code{read}.  @xref{Input
+Functions}.
 
 Instead of using this variable, it is cleaner to use another, newer
 feature: to pass the function as the @var{read-function} argument to
@@ -968,11 +972,8 @@ The feature @var{feature} was provided.
 @item (cl-defmethod @var{method} @var{specializers})
 The named @var{method} was defined by using @code{cl-defmethod}, with
 @var{specializers} as its specializers.
-@item (cl-defmethod @var{gfun} t @dots{})
-A generic function @var{gfun} was defined by using
-@code{cl-defgeneric}.  The number of @code{t} members of the list
-following @var{gfun} reflects the number of the generic arguments in
-the @var{args} form of the corresponding @code{cl-defgeneric} call.
+@item (define-type . @var{type})
+The type @var{type} was defined.
 @end table
 
 The value of @code{load-history} may have one element whose @sc{car} is
@@ -1088,11 +1089,12 @@ execution of the rest of @var{body}.
 @end defmac
 
 Normally, well-designed Lisp programs should not use
-@code{eval-after-load}.  If you need to examine and set the variables
-defined in another library (those meant for outside use), you can do
-it immediately---there is no need to wait until the library is loaded.
-If you need to call functions defined by that library, you should load
-the library, preferably with @code{require} (@pxref{Named Features}).
+@code{with-eval-after-load}.  If you need to examine and set the
+variables defined in another library (those meant for outside use),
+you can do it immediately---there is no need to wait until the library
+is loaded.  If you need to call functions defined by that library, you
+should load the library, preferably with @code{require} (@pxref{Named
+Features}).
 
 @node Dynamic Modules
 @section Emacs Dynamic Modules