Next: Delayed Evaluation, Previous: Fly Evaluation, Up: Read/Load/Eval
Load filename and evaluate its contents in the top-level environment. The load paths are not searched. If the variable
%load-hookis defined, it should be bound to a procedure that will be called before any code is loaded. See documentation for%load-hooklater in this section.
Load a Scheme source file named NAME, searching for it in the directories listed in
%load-path, and applying each of the file name extensions listed in%load-extensions.
Load filename and evaluate its contents in the top-level environment. The load paths are not searched; filename must either be a full pathname or a pathname relative to the current directory. If the variable
%load-hookis defined, it should be bound to a procedure that will be called before any code is loaded. See documentation for%load-hooklater in this section.
Search %load-path for filename and load it into the top-level environment. If filename does not name a loadable file, signal error.
Search %load-path for filename, which must be readable by the current user. If filename is found in the list of paths to search or is an absolute pathname, return its full pathname. Otherwise, return
#f. Filenames may have any of the optional extensions in the%load-extensionslist;%search-load-pathwill try each extension automatically.
A procedure to be run whenever
primitive-loadis called. If this procedure is defined, it will be called with the filename argument that was passed toprimitive-load.(define %load-hook (lambda (file) (display "Loading ") (display file) (write-line "...."))) (load-from-path "foo.scm") -| Loading /usr/local/share/guile/site/foo.scm....