As in standard Common Lisp, this function loads a file containing
source or object code into the running Lisp. Several CMU extensions
have been made to
load to conveniently support a variety of
program file organizations. filename may be a wildcard
pathname such as *.lisp, in which case all matching files are
If filename has a
pathname-type (or extension), then
that exact file is loaded. If the file has no extension, then this
load to use a heuristic to load the “right” file.
variables below are used to determine the default source and object
file types. If only the source or the object file exists (but not
both), then that file is quietly loaded. Similarly, if both the
source and object file exist, and the object file is newer than the
source file, then the object file is loaded. The value of the
if-source-newer argument is used to determine what action to
take when both the source and object files exist, but the object
file is out of date:
The object file is loaded even though the source file is newer.
The source file is loaded instead of the older object file.
The source file is compiled and then the new object file is loaded.
The user is asked a yes or no question to determine whether the source or object file is loaded.
This argument defaults to the value of
The contents argument can be used to override the heuristic
(based on the file extension) that normally determines whether to
load the file as a source file or an object file. If non-null, this
argument must be either
:binary, which forces
loading in source and binary mode, respectively. You really
shouldn’t ever need to use this argument.
These variables are lists of possible
for source and object files to be passed to
variables are only used when the file passed to
load has no
type; in this case, the possible source and object types are used to
default the type in order to determine the names of the source and
This variable determines the default value of the
if-source-newer argument to
load. Its initial value is