2 Customizing the Lisp Environment
The autoloading facility allows Lisp to load a specified file only when a function or a macro defined in that file is first called; that is, it loads the function or macro on demand. This facility consists of the following constructs:
*autoload-verbose* autoloadablep defmacro-autoload defun-autoload define-autoload ensure-autoloadedThe macros
defmacro-autoloaddefine functions and macros that are autoloadable; that is, they define the functions and macros that should be loaded on demand and identify their home files. The function
define-autoloadprovides a functional interface for autoload definitions. The predicate
autoloadablepidentifies constructs that can be loaded on demand, and the function
ensure-autoloadedmakes certain that autoloadable constructs have been loaded into the Lisp environment.
To demonstrate how the autoloading facility works, imagine that the following lines appear in your initialization file:
(defun-autoload (monitor "//atlantis/lnz/monitor") ()) (defun-autoload (monitor-functions "//atlantis/lnz/monitor") ()) (defun-autoload (find-callers "/u/lnz/tools/find-callers") ()) (defmacro-autoload (resetq "~/tools") (symbol value))The first time that you invoke the function
find-callers, Lisp loads the file
"/u/lnz/tools/find-callers"that contains the definition of the function.
Generated with Harlequin WebMaker