LOAD
LOAD
accepts four additional keyword arguments :ECHO
,
:COMPILING
, :EXTRA-FILE-TYPES
, and :OBSOLETE-ACTION
.
(LOAD
filename
&KEY
((:VERBOSE
*LOAD-VERBOSE*
)*LOAD-VERBOSE*
) ((*LOAD-PRINT*
)*LOAD-PRINT*
) ((:ECHO
CUSTOM:*LOAD-ECHO*
)CUSTOM:*LOAD-ECHO*
):IF-DOES-NOT-EXIST
((:COMPILING
CUSTOM:*LOAD-COMPILING*
)CUSTOM:*LOAD-COMPILING*
):EXTRA-FILE-TYPES
((:OBSOLETE-ACTION
CUSTOM:*LOAD-OBSOLETE-ACTION*
)CUSTOM:*LOAD-OBSOLETE-ACTION*
) (ignore-pathname-defaults nil))
:VERBOSE
LOAD
to emit a short message that a file is
being loaded. The default is *LOAD-VERBOSE*
, which is initially
T
, but can be changed by the -v
option.
:PRINT
LOAD
to print the value of each form. The
default is *LOAD-PRINT*
, which is initially NIL
, but can be
changed by the -v
option.:ECHO
*STANDARD-OUTPUT*
(normally to the screen). Should there be an
error in the file, you can see at one glance where it is.
The default is CUSTOM:*LOAD-ECHO*
,
which is initially NIL
, but can be changed by the -v
option.
:COMPILING
COMPILE-FILE
- not written to a file.
The default is CUSTOM:*LOAD-COMPILING*
,
which is initially NIL
, but can be changed by the -C
option.
:EXTRA-FILE-TYPES
Specifies the LIST
of additional file types
considered for loading, in addition to CUSTOM:*SOURCE-FILE-TYPES*
(which is initially ("lisp" "lsp" "cl")
)
and CUSTOM:*COMPILED-FILE-TYPES*
(which is initially ("fas")
).
When filename
does not specify a unique file
(e.g., filename
is #P"foo"
and both #P"foo.lisp"
and #P"foo.fas"
are found in the
CUSTOM:*LOAD-PATHS*
), then the newest file is loaded.
:OBSOLETE-ACTION
Specifies the action to take when loading a
#P".fas"
with a different bytecode version from the one
supported by this CLISP version. The possible actions are
:DELETE
#P".fas"
and proceed as with NIL
:ERROR
SIGNAL
an ERROR
:COMPILE
CUSTOM:*LOAD-PATHS*
)
and LOAD
the resultNIL
(default)WARN
and look
for another matching file
If no file can be loaded and :IF-DOES-NOT-EXIST
is non-NIL
, an ERROR
is SIGNAL
ed.
The default is CUSTOM:*LOAD-OBSOLETE-ACTION*
,
which is initially NIL
.
:IGNORE-PATHNAME-DEFAULTS
*DEFAULT-PATHNAME-DEFAULTS*
to the
argument using MERGE-PATHNAMES
(as required by [ANSI CL standard]) and rely
on CUSTOM:*LOAD-PATHS*
instead.The variables *LOAD-VERBOSE*
, *LOAD-PRINT*
,
CUSTOM:*LOAD-OBSOLETE-ACTION*
, CUSTOM:*LOAD-COMPILING*
, and CUSTOM:*LOAD-ECHO*
are bound by LOAD
when it
receives a corresponding keyword argument (:VERBOSE
, :PRINT
,
:OBSOLETE-ACTION
, :COMPILING
, and :ECHO
), i.e., these arguments
are recursive, just like the arguments :WARNINGS
, :VERBOSE
, and
:PRINT
for COMPILE-FILE
.
When evaluation of a read form SIGNAL
s an ERROR
, three RESTART
s are
available:
SKIP
RETRY
STOP
On success, LOAD
returns the TRUENAME
of the file which it loaded,
or the filename
argument if it is a STREAM
but not a FILE-STREAM
.
Variable CUSTOM:*LOAD-PATHS*
. The variable CUSTOM:*LOAD-PATHS*
contains a list of directories where the
files are looked for - in addition to the specified or current
directory - by LOAD
, REQUIRE
, COMPILE-FILE
and
LOAD-LOGICAL-PATHNAME-TRANSLATIONS
.
These notes document CLISP version 2.49.93+ | Last modified: 2018-02-19 |