@copying
This file documents the GNU Emacs Common Lisp emulation package.
-Copyright @copyright{} 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright @copyright{} 1993, 2001-2012 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@end quotation
@end copying
-@dircategory Emacs
+@dircategory Emacs lisp libraries
@direntry
* CL: (cl). Partial Common Lisp support for Emacs Lisp.
@end direntry
@contents
-@node Top, Overview, (dir), (dir)
-@chapter Introduction
-
-@noindent
-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.
-
@ifnottex
+@node Top
+@top GNU Emacs Common Lisp Emulation
+
@insertcopying
@end ifnottex
@menu
* Overview:: Installation, usage, etc.
-* Program Structure:: Arglists, `eval-when', `defalias'
-* Predicates:: `typep' and `equalp'
-* Control Structure:: `setf', `do', `loop', etc.
-* Macros:: Destructuring, `define-compiler-macro'
-* Declarations:: `proclaim', `declare', etc.
-* Symbols:: Property lists, `gensym'
+* Program Structure:: Arglists, @code{eval-when}, @code{defalias}
+* Predicates:: @code{typep} and @code{equalp}
+* Control Structure:: @code{setf}, @code{do}, @code{loop}, etc.
+* Macros:: Destructuring, @code{define-compiler-macro}
+* Declarations:: @code{proclaim}, @code{declare}, etc.
+* Symbols:: Property lists, @code{gensym}
* Numbers:: Predicates, functions, random numbers
* Sequences:: Mapping, functions, searching, sorting
-* Lists:: `caddr', `sublis', `member*', `assoc*', etc.
-* Structures:: `defstruct'
-* Assertions:: `check-type', `assert', `ignore-errors'.
+* Lists:: @code{caddr}, @code{sublis}, @code{member*}, @code{assoc*}, etc.
+* Structures:: @code{defstruct}
+* Assertions:: @code{check-type}, @code{assert}, @code{ignore-errors}.
* Efficiency Concerns:: Hints and techniques
* Common Lisp Compatibility:: All known differences with Steele
* Variable Index::
@end menu
-@node Overview, Program Structure, Top, Top
-@ifnottex
+@node Overview
@chapter Overview
-@end ifnottex
@noindent
+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.
+
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.
@item
Some features conflict with existing things in Emacs Lisp. For
-example, Emacs' @code{assoc} function is incompatible with the
+example, Emacs's @code{assoc} function is incompatible with the
Common Lisp @code{assoc}. In such cases, this package usually
adds the suffix @samp{*} to the function name of the Common
Lisp version of the function (e.g., @code{assoc*}).
* Naming Conventions:: Notes on CL function names
@end menu
-@node Usage, Organization, Overview, Overview
+@node Usage
@section Usage
@noindent
@end example
@noindent
-If you want to ensure that the new (Gillespie) version of @dfn{CL}
-is the one that is present, add an additional @code{(require 'cl-19)}
-call:
-
-@example
-(require 'cl)
-(require 'cl-19)
-@end example
-
-@noindent
-The second call will fail (with ``@file{cl-19.el} not found'') if
-the old @file{cl.el} package was in use.
-
It is safe to arrange to load @dfn{CL} at all times, e.g.,
in your @file{.emacs} file. But it's a good idea, for portability,
to @code{(require 'cl)} in your code even if you do this.
-@node Organization, Installation, Usage, Overview
+@node Organization
@section Organization
@noindent
needed.
There is another file, @file{cl-compat.el}, which defines some
-routines from the older @file{cl.el} package that are no longer
+routines from the older @file{cl.el} package that are not otherwise
present in the new package. This includes internal routines
like @code{setelt} and @code{zip-lists}, deprecated features
like @code{defkeyword}, and an emulation of the old-style
-multiple-values feature. @xref{Old CL Compatibility}.
+multiple-values feature. This file is obsolete and should not be used
+in new code. @xref{Old CL Compatibility}.
-@node Installation, Naming Conventions, Organization, Overview
+@node Installation
@section Installation
@noindent
-Installation of the @dfn{CL} package is simple: Just put the
-byte-compiled files @file{cl.elc}, @file{cl-extra.elc},
-@file{cl-seq.elc}, @file{cl-macs.elc}, and @file{cl-compat.elc}
-into a directory on your @code{load-path}.
-
-There are no special requirements to compile this package:
-The files do not have to be loaded before they are compiled,
-nor do they need to be compiled in any particular order.
-
-You may choose to put the files into your main @file{lisp/}
-directory, replacing the original @file{cl.el} file there. Or,
-you could put them into a directory that comes before @file{lisp/}
-on your @code{load-path} so that the old @file{cl.el} is
-effectively hidden.
-
-Also, format the @file{cl.texinfo} file and put the resulting
-Info files in the @file{info/} directory or another suitable place.
-
-You may instead wish to leave this package's components all in
-their own directory, and then add this directory to your
-@code{load-path} and @code{Info-directory-list}.
-Add the directory to the front of the list so the old @dfn{CL}
-package and its documentation are hidden.
-
-@node Naming Conventions, , Installation, Overview
+The @dfn{CL} package is distributed with Emacs, so there is no need
+to install anything.
+
+If you do need to install it, just put the byte-compiled files
+@file{cl.elc}, @file{cl-extra.elc}, @file{cl-seq.elc},
+@file{cl-macs.elc}, and (if necessary) @file{cl-compat.elc} into a
+directory on your @code{load-path}. Also, format the @file{cl.texi}
+file and put the resulting Info files into a directory in your
+@code{Info-directory-list}.
+
+@node Naming Conventions
@section Naming Conventions
@noindent
@noindent
[4] Only when @var{place} is a plain variable name.
-@iftex
-@chapno=4
-@end iftex
-
-@node Program Structure, Predicates, Overview, Top
+@node Program Structure
@chapter Program Structure
@noindent
and the @code{eval-when} construct.
@menu
-* Argument Lists:: `&key', `&aux', `defun*', `defmacro*'.
-* Time of Evaluation:: The `eval-when' construct.
+* Argument Lists:: @code{&key}, @code{&aux}, @code{defun*}, @code{defmacro*}.
+* Time of Evaluation:: The @code{eval-when} construct.
@end menu
@iftex
@secno=1
@end iftex
-@node Argument Lists, Time of Evaluation, Program Structure, Program Structure
+@node Argument Lists
@section Argument Lists
@noindent
arguments and invalid keyword arguments is disabled. By default,
argument lists are rigorously checked.
-@node Time of Evaluation, , Argument Lists, Program Structure
+@node Time of Evaluation
@section Time of Evaluation
@noindent
@end example
@end defspec
-@node Predicates, Control Structure, Program Structure, Top
+@node Predicates
@chapter Predicates
@noindent
facts are true or false.
@menu
-* Type Predicates:: `typep', `deftype', and `coerce'
-* Equality Predicates:: `equalp'
+* Type Predicates:: @code{typep}, @code{deftype}, and @code{coerce}
+* Equality Predicates:: @code{equalp}
@end menu
-@node Type Predicates, Equality Predicates, Predicates, Predicates
+@node Type Predicates
@section Type Predicates
@noindent
@code{concatenate}, and @code{merge} functions take type-name
arguments to specify the type of sequence to return. @xref{Sequences}.
-@node Equality Predicates, , Type Predicates, Predicates
+@node Equality Predicates
@section Equality Predicates
@noindent
In Emacs, use @code{member*} and @code{assoc*} to get functions
which use @code{eql} for comparisons.
-@node Control Structure, Macros, Predicates, Top
+@node Control Structure
@chapter Control Structure
@noindent
constructs.
@menu
-* Assignment:: The `psetq' form
-* Generalized Variables:: `setf', `incf', `push', etc.
-* Variable Bindings:: `progv', `lexical-let', `flet', `macrolet'
-* Conditionals:: `case', `typecase'
-* Blocks and Exits:: `block', `return', `return-from'
-* Iteration:: `do', `dotimes', `dolist', `do-symbols'
-* Loop Facility:: The Common Lisp `loop' macro
-* Multiple Values:: `values', `multiple-value-bind', etc.
+* Assignment:: The @code{psetq} form
+* Generalized Variables:: @code{setf}, @code{incf}, @code{push}, etc.
+* Variable Bindings:: @code{progv}, @code{lexical-let}, @code{flet}, @code{macrolet}
+* Conditionals:: @code{case}, @code{typecase}
+* Blocks and Exits:: @code{block}, @code{return}, @code{return-from}
+* Iteration:: @code{do}, @code{dotimes}, @code{dolist}, @code{do-symbols}
+* Loop Facility:: The Common Lisp @code{loop} macro
+* Multiple Values:: @code{values}, @code{multiple-value-bind}, etc.
@end menu
-@node Assignment, Generalized Variables, Control Structure, Control Structure
+@node Assignment
@section Assignment
@noindent
@code{psetq} always returns @code{nil}.
@end defspec
-@node Generalized Variables, Variable Bindings, Assignment, Control Structure
+@node Generalized Variables
@section Generalized Variables
@noindent
is a set of forms that can be generalized variables in Lisp.
@menu
-* Basic Setf:: `setf' and place forms
-* Modify Macros:: `incf', `push', `rotatef', `letf', `callf', etc.
-* Customizing Setf:: `define-modify-macro', `defsetf', `define-setf-method'
+* Basic Setf:: @code{setf} and place forms
+* Modify Macros:: @code{incf}, @code{push}, @code{rotatef}, @code{letf}, @code{callf}, etc.
+* Customizing Setf:: @code{define-modify-macro}, @code{defsetf}, @code{define-setf-method}
@end menu
-@node Basic Setf, Modify Macros, Generalized Variables, Generalized Variables
+@node Basic Setf
@subsection Basic Setf
@noindent
to @code{wrong-order}.
@end defspec
-@node Modify Macros, Customizing Setf, Basic Setf, Generalized Variables
+@node Modify Macros
@subsection Modify Macros
@noindent
macros are used in the processing of symbol macros;
@pxref{Macro Bindings}.
-@node Customizing Setf, , Modify Macros, Generalized Variables
+@node Customizing Setf
@subsection Customizing Setf
@noindent
@secno=4
@end iftex
-@node Variable Bindings, Conditionals, Generalized Variables, Control Structure
+@node Variable Bindings
@section Variable Bindings
@noindent
are also related to variable bindings.
@menu
-* Dynamic Bindings:: The `progv' form
-* Lexical Bindings:: `lexical-let' and lexical closures
-* Function Bindings:: `flet' and `labels'
-* Macro Bindings:: `macrolet' and `symbol-macrolet'
+* Dynamic Bindings:: The @code{progv} form
+* Lexical Bindings:: @code{lexical-let} and lexical closures
+* Function Bindings:: @code{flet} and @code{labels}
+* Macro Bindings:: @code{macrolet} and @code{symbol-macrolet}
@end menu
-@node Dynamic Bindings, Lexical Bindings, Variable Bindings, Variable Bindings
+@node Dynamic Bindings
@subsection Dynamic Bindings
@noindent
are ignored.
@end defspec
-@node Lexical Bindings, Function Bindings, Dynamic Bindings, Variable Bindings
+@node Lexical Bindings
@subsection Lexical Bindings
@noindent
are made sequentially in the manner of @code{let*}.
@end defspec
-@node Function Bindings, Macro Bindings, Lexical Bindings, Variable Bindings
+@node Function Bindings
@subsection Function Bindings
@noindent
@code{function} to be passed on to, say, @code{mapcar}.
@end defspec
-@node Macro Bindings, , Function Bindings, Variable Bindings
+@node Macro Bindings
@subsection Macro Bindings
@noindent
works much like @code{my-dolist}.
@end defspec
-@node Conditionals, Blocks and Exits, Variable Bindings, Control Structure
+@node Conditionals
@section Conditionals
@noindent
simply returning @code{nil}.
@end defspec
-@node Blocks and Exits, Iteration, Conditionals, Control Structure
+@node Blocks and Exits
@section Blocks and Exits
@noindent
themselves in @code{nil} blocks.
@end defspec
-@node Iteration, Loop Facility, Blocks and Exits, Control Structure
+@node Iteration
@section Iteration
@noindent
are executed with @var{var} bound to each element of the list in
turn. Finally, the @var{result} form (or @code{nil}) is evaluated
with @var{var} bound to @code{nil} to produce the result returned by
-the loop. Unlike with Emacs's built in @code{dolist}, the loop is
+the loop. Unlike with Emacs'ss built in @code{dolist}, the loop is
surrounded by an implicit @code{nil} block.
@end defspec
from zero (inclusive) to @var{count} (exclusive), in turn. Then
the @code{result} form is evaluated with @var{var} bound to the total
number of iterations that were done (i.e., @code{(max 0 @var{count})})
-to get the return value for the loop form. Unlike with Emacs's built in
+to get the return value for the loop form. Unlike with Emacs'ss built in
@code{dolist}, the loop is surrounded by an implicit @code{nil} block.
@end defspec
@xref{Mapping over Sequences}, for some more functions for
iterating over vectors or lists.
-@node Loop Facility, Multiple Values, Iteration, Control Structure
+@node Loop Facility
@section Loop Facility
@noindent
with an easy-to-use but very powerful and expressive syntax.
@menu
-* Loop Basics:: `loop' macro, basic clause structure
-* Loop Examples:: Working examples of `loop' macro
-* For Clauses:: Clauses introduced by `for' or `as'
-* Iteration Clauses:: `repeat', `while', `thereis', etc.
-* Accumulation Clauses:: `collect', `sum', `maximize', etc.
-* Other Clauses:: `with', `if', `initially', `finally'
+* Loop Basics:: @code{loop} macro, basic clause structure
+* Loop Examples:: Working examples of @code{loop} macro
+* For Clauses:: Clauses introduced by @code{for} or @code{as}
+* Iteration Clauses:: @code{repeat}, @code{while}, @code{thereis}, etc.
+* Accumulation Clauses:: @code{collect}, @code{sum}, @code{maximize}, etc.
+* Other Clauses:: @code{with}, @code{if}, @code{initially}, @code{finally}
@end menu
-@node Loop Basics, Loop Examples, Loop Facility, Loop Facility
+@node Loop Basics
@subsection Loop Basics
@noindent
Consult the second edition of Steele's @dfn{Common Lisp, the Language},
for additional discussion and examples of the @code{loop} macro.
-@node Loop Examples, For Clauses, Loop Basics, Loop Facility
+@node Loop Examples
@subsection Loop Examples
@noindent
it calls @code{buffer-file-name} and collects the results into
a list, which is then returned from the @code{loop} construct.
The result is a list of the file names of all the buffers in
-Emacs' memory. The words @code{for}, @code{in}, and @code{collect}
+Emacs's memory. The words @code{for}, @code{in}, and @code{collect}
are reserved words in the @code{loop} language.
@example
rather than some sort of triple-nested loop. You must explicitly
nest your @code{loop} constructs if you want nested loops.
-@node For Clauses, Iteration Clauses, Loop Examples, Loop Facility
+@node For Clauses
@subsection For Clauses
@noindent
or @code{while}.
@item for @var{var} being the hash-keys of @var{hash-table}
-This clause iterates over the entries in @var{hash-table}. For each
-hash table entry, @var{var} is bound to the entry's key. If you write
-@samp{the hash-values} instead, @var{var} is bound to the values
-of the entries. The clause may be followed by the additional
-term @samp{using (hash-values @var{var2})} (where @code{hash-values}
-is the opposite word of the word following @code{the}) to cause
-@var{var} and @var{var2} to be bound to the two parts of each
-hash table entry.
+@itemx for @var{var} being the hash-values of @var{hash-table}
+This clause iterates over the entries in @var{hash-table} with
+@var{var} bound to each key, or value. A @samp{using} clause can bind
+a second variable to the opposite part.
+
+@example
+(loop for k being the hash-keys of h
+ using (hash-values v)
+ do
+ (message "key %S -> value %S" k v))
+@end example
@item for @var{var} being the key-codes of @var{keymap}
+@itemx for @var{var} being the key-bindings of @var{keymap}
This clause iterates over the entries in @var{keymap}.
The iteration does not enter nested keymaps but does enter inherited
(parent) keymaps.
-You can use @samp{the key-bindings} to access the commands bound to
-the keys rather than the key codes, and you can add a @code{using}
-clause to access both the codes and the bindings together.
+A @code{using} clause can access both the codes and the bindings
+together.
+
+@example
+(loop for c being the key-codes of (current-local-map)
+ using (key-bindings b)
+ do
+ (message "key %S -> binding %S" c b))
+@end example
+
@item for @var{var} being the key-seqs of @var{keymap}
This clause iterates over all key sequences defined by @var{keymap}
@code{of} term may specify either a buffer or a string.
@item for @var{var} being the frames
-This clause iterates over all frames, i.e., X window system windows
-open on Emacs files. The
-clause @code{screens} is a synonym for @code{frames}. The frames
-are visited in @code{next-frame} order starting from
-@code{selected-frame}.
+This clause iterates over all Emacs frames. The clause @code{screens} is
+a synonym for @code{frames}. The frames are visited in
+@code{next-frame} order starting from @code{selected-frame}.
@item for @var{var} being the windows [of @var{frame}]
This clause iterates over the windows (in the Emacs sense) of
-the current frame, or of the specified @var{frame}.
+the current frame, or of the specified @var{frame}. It visits windows
+in @code{next-window} order starting from @code{selected-window}
+(or @code{frame-selected-window} if you specify @var{frame}).
+This clause treats the minibuffer window in the same way as
+@code{next-window} does. For greater flexibility, consider using
+@code{walk-windows} instead.
@item for @var{var} being the buffers
This clause iterates over all buffers in Emacs. It is equivalent
than values the trailing variables get the value @code{nil}.
If @code{nil} is used as a variable name, the corresponding
values are ignored. Destructuring may be nested, and dotted
-lists of variables like @code{(x . y)} are allowed.
+lists of variables like @code{(x . y)} are allowed, so for example
+to process an alist
+
+@example
+(loop for (key . value) in '((a . 1) (b . 2))
+ collect value)
+ @result{} (1 2)
+@end example
-@node Iteration Clauses, Accumulation Clauses, For Clauses, Loop Facility
+@node Iteration Clauses
@subsection Iteration Clauses
@noindent
values were @code{nil}, the loop returns @code{nil}.
@end table
-@node Accumulation Clauses, Other Clauses, Iteration Clauses, Loop Facility
+@node Accumulation Clauses
@subsection Accumulation Clauses
@noindent
@result{} (fred bob ken sue alice joe kris sunshine june)
@end example
-@node Other Clauses, , Accumulation Clauses, Loop Facility
+@node Other Clauses
@subsection Other Clauses
@noindent
iterate over keymaps, overlays, intervals, frames, windows, and
buffers are Emacs-specific extensions.
-@node Multiple Values, , Loop Facility, Control Structure
+@node Multiple Values
@section Multiple Values
@noindent
Since a perfect emulation is not feasible in Emacs Lisp, this
package opts to keep it as simple and predictable as possible.
-@node Macros, Declarations, Control Structure, Top
+@node Macros
@chapter Macros
@noindent
and @code{symbol-macrolet} forms for making ``local'' macro
definitions.
-@node Declarations, Symbols, Macros, Top
+@node Declarations
@chapter Declarations
@noindent
See the documentation for the optimizing byte compiler for details.
@end table
-@node Symbols, Numbers, Declarations, Top
+@node Symbols
@chapter Symbols
@noindent
missing from Emacs Lisp.
@menu
-* Property Lists:: `get*', `remprop', `getf', `remf'
-* Creating Symbols:: `gensym', `gentemp'
+* Property Lists:: @code{get*}, @code{remprop}, @code{getf}, @code{remf}
+* Creating Symbols:: @code{gensym}, @code{gentemp}
@end menu
-@node Property Lists, Creating Symbols, Symbols, Symbols
+@node Property Lists
@section Property Lists
@noindent
@secno=2
@end iftex
-@node Creating Symbols, , Property Lists, Symbols
+@node Creating Symbols
@section Creating Symbols
@noindent
keywords as data unrelated to keyword arguments, so the
@code{defkeyword} form has been discontinued.
-@iftex
-@chapno=11
-@end iftex
-
-@node Numbers, Sequences, Symbols, Top
+@node Numbers
@chapter Numbers
@noindent
which were left out of Emacs Lisp.
@menu
-* Predicates on Numbers:: `plusp', `oddp', `floatp-safe', etc.
-* Numerical Functions:: `abs', `floor*', etc.
-* Random Numbers:: `random*', `make-random-state'
-* Implementation Parameters:: `most-positive-float'
+* Predicates on Numbers:: @code{plusp}, @code{oddp}, @code{floatp-safe}, etc.
+* Numerical Functions:: @code{abs}, @code{floor*}, etc.
+* Random Numbers:: @code{random*}, @code{make-random-state}
+* Implementation Parameters:: @code{most-positive-float}
@end menu
@iftex
@secno=1
@end iftex
-@node Predicates on Numbers, Numerical Functions, Numbers, Numbers
+@node Predicates on Numbers
@section Predicates on Numbers
@noindent
@secno=3
@end iftex
-@node Numerical Functions, Random Numbers, Predicates on Numbers, Numbers
+@node Numerical Functions
@section Numerical Functions
@noindent
@secno=8
@end iftex
-@node Random Numbers, Implementation Parameters, Numerical Functions, Numbers
+@node Random Numbers
@section Random Numbers
@noindent
@code{random-state} object, or @code{nil} otherwise.
@end defun
-@node Implementation Parameters, , Random Numbers, Numbers
+@node Implementation Parameters
@section Implementation Parameters
@noindent
@code{1.11e-16}.
@end defvar
-@iftex
-@chapno=13
-@end iftex
-
-@node Sequences, Lists, Numbers, Top
+@node Sequences
@chapter Sequences
@noindent
@menu
* Sequence Basics:: Arguments shared by all sequence functions
-* Mapping over Sequences:: `mapcar*', `mapcan', `map', `every', etc.
-* Sequence Functions:: `subseq', `remove*', `substitute', etc.
-* Searching Sequences:: `find', `position', `count', `search', etc.
-* Sorting Sequences:: `sort*', `stable-sort', `merge'
+* Mapping over Sequences:: @code{mapcar*}, @code{mapcan}, @code{map}, @code{every}, etc.
+* Sequence Functions:: @code{subseq}, @code{remove*}, @code{substitute}, etc.
+* Searching Sequences:: @code{find}, @code{position}, @code{count}, @code{search}, etc.
+* Sorting Sequences:: @code{sort*}, @code{stable-sort}, @code{merge}
@end menu
-@node Sequence Basics, Mapping over Sequences, Sequences, Sequences
+@node Sequence Basics
@section Sequence Basics
@noindent
the properties of the characters copied from @var{str} into the
result.
-@node Mapping over Sequences, Sequence Functions, Sequence Basics, Sequences
+@node Mapping over Sequences
@section Mapping over Sequences
@noindent
be faster since it generates the loop as in-line code with no
function calls.
-@node Sequence Functions, Searching Sequences, Mapping over Sequences, Sequences
+@node Sequence Functions
@section Sequence Functions
@noindent
As an extension to Common Lisp, @var{start} and/or @var{end}
may be negative, in which case they represent a distance back
from the end of the sequence. This is for compatibility with
-Emacs' @code{substring} function. Note that @code{subseq} is
+Emacs's @code{substring} function. Note that @code{subseq} is
the @emph{only} sequence function that allows negative
@var{start} and @var{end}.
and @code{nsubstitute-if-not} functions are defined similarly. For
these, a @var{predicate} is given in place of the @var{old} argument.
-@node Searching Sequences, Sorting Sequences, Sequence Functions, Sequences
+@node Searching Sequences
@section Searching Sequences
@noindent
function finds the @emph{rightmost} matching subsequence.
@end defun
-@node Sorting Sequences, , Searching Sequences, Sequences
+@node Sorting Sequences
@section Sorting Sequences
@defun sort* seq predicate @t{&key :key}
for sorting numbers and strings, respectively; @code{>} would sort
numbers into decreasing rather than increasing order.
-This function differs from Emacs' built-in @code{sort} in that it
+This function differs from Emacs's built-in @code{sort} in that it
can operate on any type of sequence, not just lists. Also, it
accepts a @code{:key} argument which is used to preprocess data
fed to the @var{predicate} function. For example,
@var{predicate}.
@end defun
-@node Lists, Structures, Sequences, Top
+@node Lists
@chapter Lists
@noindent
The functions described here operate on lists.
@menu
-* List Functions:: `caddr', `first', `list*', etc.
-* Substitution of Expressions:: `subst', `sublis', etc.
-* Lists as Sets:: `member*', `adjoin', `union', etc.
-* Association Lists:: `assoc*', `rassoc*', `acons', `pairlis'
+* List Functions:: @code{caddr}, @code{first}, @code{list*}, etc.
+* Substitution of Expressions:: @code{subst}, @code{sublis}, etc.
+* Lists as Sets:: @code{member*}, @code{adjoin}, @code{union}, etc.
+* Association Lists:: @code{assoc*}, @code{rassoc*}, @code{acons}, @code{pairlis}
@end menu
-@node List Functions, Substitution of Expressions, Lists, Lists
+@node List Functions
@section List Functions
@noindent
@secno=3
@end iftex
-@node Substitution of Expressions, Lists as Sets, List Functions, Lists
+@node Substitution of Expressions
@section Substitution of Expressions
@noindent
This is a destructive version of @code{sublis}.
@end defun
-@node Lists as Sets, Association Lists, Substitution of Expressions, Lists
+@node Lists as Sets
@section Lists as Sets
@noindent
also appears in @var{list2}.
@end defun
-@node Association Lists, , Lists as Sets, Lists
+@node Association Lists
@section Association Lists
@noindent
@var{alist})}.
@end defun
-@iftex
-@chapno=18
-@end iftex
-
-@node Structures, Assertions, Lists, Top
+@node Structures
@chapter Structures
@noindent
Except as noted, the @code{defstruct} facility of this package is
entirely compatible with that of Common Lisp.
-@iftex
-@chapno=23
-@end iftex
-
-@node Assertions, Efficiency Concerns, Structures, Top
+@node Assertions
@chapter Assertions and Errors
@noindent
returns the result of the last @var{form}.
@end defspec
-@node Efficiency Concerns, Common Lisp Compatibility, Assertions, Top
+@node Efficiency Concerns
@appendix Efficiency Concerns
@appendixsec Macros
optimizing compiler removes @code{block}s which are not actually
referenced by @code{return} or @code{return-from} inside the block.
-@node Common Lisp Compatibility, Old CL Compatibility, Efficiency Concerns, Top
+@node Common Lisp Compatibility
@appendix Common Lisp Compatibility
@noindent
The second argument of @code{check-type} is treated differently.
-@node Old CL Compatibility, Porting Common Lisp, Common Lisp Compatibility, Top
+@node Old CL Compatibility
@appendix Old CL Compatibility
@noindent
@noindent
The @dfn{CL} package includes emulations of some features of the
old @file{cl.el}, in the form of a compatibility package
-@code{cl-compat}. To use it, put @code{(require 'cl-compat)} in
-your program.
+@code{cl-compat}. This file is obsolete and may be removed in future,
+so it should not be used in new code.
The old package defined a number of internal routines without
@code{cl-} prefixes or other annotations. Call to these routines
@code{floor}, @code{ceiling}, etc.; @code{cl-compat} cannot use
these names because they conflict with Emacs built-ins.
-@node Porting Common Lisp, GNU Free Documentation License, Old CL Compatibility, Top
+@node Porting Common Lisp
@appendix Porting Common Lisp
@noindent
@xref{Lexical Bindings}, for a description of the @code{lexical-let}
form which establishes a Common Lisp-style lexical binding, and some
-examples of how it differs from Emacs' regular @code{let}.
+examples of how it differs from Emacs's regular @code{let}.
@item
Reader macros. Common Lisp includes a second type of macro that
recursion.
@end itemize
-@node GNU Free Documentation License, Function Index, Porting Common Lisp, Top
+@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include doclicense.texi
-@node Function Index, Variable Index, GNU Free Documentation License, Top
+@node Function Index
@unnumbered Function Index
@printindex fn
-@node Variable Index, , Function Index, Top
+@node Variable Index
@unnumbered Variable Index
@printindex vr
@bye
-@ignore
- arch-tag: b61e7200-3bfa-4a70-a9d3-095e152696f8
-@end ignore