Next: Program Structure, Previous: Top, Up: Top

## 2 Overview

Common Lisp is a huge language, and Common Lisp systems tend to be massive and extremely complex. Emacs Lisp, by contrast, is rather minimalist in the choice of Lisp features it offers the programmer. As Emacs Lisp programmers have grown in number, and the applications they write have grown more ambitious, it has become clear that Emacs Lisp could benefit from many of the conveniences of Common Lisp.

The CL package adds a number of Common Lisp functions and control structures to Emacs Lisp. While not a 100% complete implementation of Common Lisp, CL adds enough functionality to make Emacs Lisp programming significantly more convenient.

Please note: the CL functions are not standard parts of the Emacs Lisp name space, so it is legitimate for users to define them with other, conflicting meanings. To avoid conflicting with those user activities, we have a policy that packages installed in Emacs must not load CL at run time. (It is ok for them to load CL at compile time only, with `eval-when-compile`, and use the macros it provides.) If you are writing packages that you plan to distribute and invite widespread use for, you might want to observe the same rule.

Some Common Lisp features have been omitted from this package for various reasons:

- Some features are too complex or bulky relative to their benefit to Emacs Lisp programmers. CLOS and Common Lisp streams are fine examples of this group.
- Other features cannot be implemented without modification to the Emacs Lisp interpreter itself, such as multiple return values, lexical scoping, case-insensitive symbols, and complex numbers. The CL package generally makes no attempt to emulate these features.
- Some features conflict with existing things in Emacs Lisp. For example, Emacs' `assoc` function is incompatible with the Common Lisp `assoc`. In such cases, this package usually adds the suffix ‘`*`’ to the function name of the Common Lisp version of the function (e.g., `assoc*`).

The package described here was written by Dave Gillespie, `daveg@synaptics.com`. It is a total rewrite of the original 1986 `cl.el` package by Cesar Quiroz. Most features of the Quiroz package have been retained; any incompatibilities are noted in the descriptions below. Care has been taken in this version to ensure that each function is defined efficiently, concisely, and with minimal impact on the rest of the Emacs environment.