newdoc: add comment about the ext:*load-hooks*

This commit is contained in:
Daniel Kochmański 2016-09-06 08:54:46 +02:00
parent 05ecb5dfd0
commit 21b30c8c1e

View file

@ -114,6 +114,34 @@
@node System construction
@section System construction
@c ext:*load-hooks*, si::*load-search-list* variable:
@c EXT:*LOAD-HOOKS* is an assoc array of form ((TYPE . LOAD-FUNCTION)),
@c where TYPE is either a string (i.e "lisp", "fasb" etc.), wildcard
@c :WILD (matching any extension) and NIL for no
@c extension. LOAD-FUNCTION is a symbol of a function used to load the
@c file of the TYPE type.
@c If the argument SOURCE of LOAD is a stream, it is read as an ordinary
@c lisp source code, otherwise it should a pathname (or a string which
@c may be coerced to it).
@c If pathname doesn't have a directory, host nor device components,
@c then file is looked in the `:SEARCH-LIST` directories (defaulting to
@c si::*load-search-list*) and if found loaded with LOAD (with
@c pathname with a directory merged from the search-list).
@c Otherwise (if a pathname does have a directory or the file can't be
@c found in the SEARCH-LIST) and the file type is neither NIL or :WILD,
@c then the assoc value of the TYPE is looked up in EXT:*LOAD-HOOKS* and
@c funcalled on the file (if the TYPE doesn't exist, we load a file as a source code).
@c If file type is NIL or :WILD, then we try to "guess" it's extension
@c trying extensions from the EXT:*LOAD-HOOKS* in order in which they
@c appear on the list. By default, first entry is (NIL
@c . SI:LOAD-SOURCE), so if there is a file without extension in the
@c directory, it will be treated as a source code. Otherwise we'll try
@c known extensions.
@node Environment
@section Environment