- "Loads the file given by FILESPEC into the Lisp environment, returning
- T on success. These options are defined:
-
- :IF-DOES-NOT-EXIST
- What should we do if the file can't be located? If true (the
- default), signal an error. If NIL, simply return NIL.
-
- :VERBOSE
- If true, print a line describing each file loaded. The default
- is *LOAD-VERBOSE*.
-
- :PRINT
- If true, print information about loaded values. When loading the
- source, the result of evaluating each top-level form is printed.
- The default is *LOAD-PRINT*."
-
- (let ((sb!c::*default-cookie* sb!c::*default-cookie*)
- (sb!c::*default-interface-cookie* sb!c::*default-interface-cookie*)
- (*package* *package*)
- (*readtable* *readtable*)
- (*load-depth* (1+ *load-depth*))
- ;; The old CMU CL LOAD function used an IF-DOES-NOT-EXIST argument of
- ;; (MEMBER :ERROR NIL) type. ANSI constrains us to accept a generalized
- ;; boolean argument value for this externally-visible function, but the
- ;; internal functions still use the old convention.
- (internal-if-does-not-exist (if if-does-not-exist :error nil)))
- ;; FIXME: This VALUES wrapper is inherited from CMU CL.
- ;; Once SBCL gets function return type checking right, we can
- ;; achieve a similar effect better by adding FTYPE declarations.
+ "Load the file given by FILESPEC into the Lisp environment, returning
+ T on success."
+ (let ((*load-depth* (1+ *load-depth*))
+ ;; KLUDGE: I can't find in the ANSI spec where it says that
+ ;; DECLAIM/PROCLAIM of optimization policy should have file
+ ;; scope. CMU CL did this, and it seems reasonable, but it
+ ;; might not be right; after all, things like (PROCLAIM '(TYPE
+ ;; ..)) don't have file scope, and I can't find anything under
+ ;; PROCLAIM or COMPILE-FILE or LOAD or OPTIMIZE which
+ ;; justifies this behavior. Hmm. -- WHN 2001-04-06
+ (sb!c::*policy* sb!c::*policy*)
+ ;; The ANSI spec for LOAD says "LOAD binds *READTABLE* and
+ ;; *PACKAGE* to the values they held before loading the file."
+ (*package* (sane-package))
+ (*readtable* *readtable*)
+ ;; The old CMU CL LOAD function used an IF-DOES-NOT-EXIST
+ ;; argument of (MEMBER :ERROR NIL) type. ANSI constrains us to
+ ;; accept a generalized boolean argument value for this
+ ;; externally-visible function, but the internal functions
+ ;; still use the old convention.
+ (internal-if-does-not-exist (if if-does-not-exist :error nil)))
+ ;; FIXME: This VALUES wrapper is inherited from CMU CL. Once SBCL
+ ;; gets function return type checking right, we can achieve a
+ ;; similar effect better by adding FTYPE declarations.