Next: Installation, Previous: Usage, Up: Overview [Contents][Index]
The Common Lisp package is organized into four files:
This is the “main” file, which contains basic functions and information about the package. This file is relatively compact—about 700 lines.
This file contains the larger, more complex or unusual functions.
It is kept separate so that packages which only want to use Common
Lisp fundamentals like the cadr
function won’t need to pay
the overhead of loading the more advanced functions.
This file contains most of the advanced functions for operating
on sequences or lists, such as delete-if
and assoc*
.
This file contains the features of the packages which are macros instead of functions. Macros expand when the caller is compiled, not when it is run, so the macros generally only need to be present when the byte-compiler is running (or when the macros are used in uncompiled code such as a .emacs file). Most of the macros of this package are isolated in cl-macs.el so that they won’t take up memory unless you are compiling.
The file cl.el includes all necessary autoload
commands for the functions and macros in the other three files.
All you have to do is (require 'cl)
, and cl.el
will take care of pulling in the other files when they are
needed.
There is another file, cl-compat.el, which defines some
routines from the older cl.el package that are no longer
present in the new package. This includes internal routines
like setelt
and zip-lists
, deprecated features
like defkeyword
, and an emulation of the old-style
multiple-values feature. See Old CL Compatibility.
Next: Installation, Previous: Usage, Up: Overview [Contents][Index]