# Common Lisp Extensions

## Table of Contents

- 1 Introduction
- 2 Overview
  - 2.1 Usage
  - 2.2 Organization
  - 2.3 Installation
  - 2.4 Naming Conventions
- 3 Program Structure
  - 3.1 Argument Lists
  - 3.2 Time of Evaluation
- 4 Predicates
  - 4.1 Type Predicates
  - 4.2 Equality Predicates
- 5 Control Structure
  - 5.1 Assignment
  - 5.2 Generalized Variables
    - 5.2.1 Basic Setf
    - 5.2.2 Modify Macros
    - 5.2.3 Customizing Setf
  - 5.3 Variable Bindings
    - 5.3.1 Dynamic Bindings
    - 5.3.2 Lexical Bindings
    - 5.3.3 Function Bindings
    - 5.3.4 Macro Bindings
  - 5.4 Conditionals
  - 5.5 Blocks and Exits
  - 5.6 Iteration
  - 5.7 Loop Facility
    - 5.7.1 Loop Basics
    - 5.7.2 Loop Examples
    - 5.7.3 For Clauses
    - 5.7.4 Iteration Clauses
    - 5.7.5 Accumulation Clauses
    - 5.7.6 Other Clauses
  - 5.8 Multiple Values
- 6 Macros
- 7 Declarations
- 8 Symbols
  - 8.1 Property Lists
  - 8.2 Creating Symbols
- 9 Numbers
  - 9.1 Predicates on Numbers
  - 9.2 Numerical Functions
  - 9.3 Random Numbers
  - 9.4 Implementation Parameters
- 10 Sequences
  - 10.1 Sequence Basics
  - 10.2 Mapping over Sequences
  - 10.3 Sequence Functions
  - 10.4 Searching Sequences
  - 10.5 Sorting Sequences
- 11 Lists
  - 11.1 List Functions
  - 11.2 Substitution of Expressions
  - 11.3 Lists as Sets
  - 11.4 Association Lists
- 12 Structures
- 13 Assertions and Errors
- Appendix A Efficiency Concerns
  - A.1 Macros
  - A.2 Error Checking
  - A.3 Optimizing Compiler
- Appendix B Common Lisp Compatibility
- Appendix C Old CL Compatibility
  - C.1 The `cl-compat` package
- Appendix D Porting Common Lisp
- Appendix E GNU Free Documentation License
- Function Index
- Variable Index

Next: Overview, Previous: (dir), Up: (dir)

## 1 Introduction

This document describes a set of Emacs Lisp facilities borrowed from Common Lisp. All the facilities are described here in detail. While this document does not assume any prior knowledge of Common Lisp, it does assume a basic familiarity with Emacs Lisp.

This file documents the GNU Emacs Common Lisp emulation package.

Copyright © 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.

> Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being “A GNU Manual”, and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”.

> (a) The FSF's Back-Cover Text is: “You have the freedom to copy and modify this GNU manual. Buying copies from the FSF supports it in developing GNU and promoting software freedom.”