diff options
| author | Glenn Morris | 2012-10-28 18:06:13 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-10-28 18:06:13 -0700 |
| commit | d3094168d6979f52c770117eb9dc5f034db07fbd (patch) | |
| tree | 816e4d907787a586e02df3ccad7b4fa6a06db2cc | |
| parent | b3871e59da478e32561f9c09e61ed1383d51a0c5 (diff) | |
| download | emacs-d3094168d6979f52c770117eb9dc5f034db07fbd.tar.gz emacs-d3094168d6979f52c770117eb9dc5f034db07fbd.zip | |
* doc/misc/cl.texi (Organization): More details on cl-lib.el versus cl.el.
| -rw-r--r-- | doc/misc/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/misc/cl.texi | 43 |
2 files changed, 29 insertions, 18 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index fe7781c57cc..8c9573aa00c 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-10-29 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * cl.texi (Organization): More details on cl-lib.el versus cl.el. | ||
| 4 | |||
| 1 | 2012-10-28 Glenn Morris <rgm@gnu.org> | 5 | 2012-10-28 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * cl.texi (Multiple Values, Common Lisp Compatibility): | 7 | * cl.texi (Multiple Values, Common Lisp Compatibility): |
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index ed4206c0b97..615a703f925 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi | |||
| @@ -182,17 +182,30 @@ All you have to do is @code{(require 'cl-lib)}, and @file{cl-lib.el} | |||
| 182 | will take care of pulling in the other files when they are | 182 | will take care of pulling in the other files when they are |
| 183 | needed. | 183 | needed. |
| 184 | 184 | ||
| 185 | There is another file, @file{cl.el}, which was the main entry point | 185 | There is another file, @file{cl.el}, which was the main entry point to |
| 186 | to the CL package prior to Emacs 24.3. Nowadays, it is replaced | 186 | the CL package prior to Emacs 24.3. Nowadays, it is replaced by |
| 187 | by @file{cl-lib.el}. The two provide the same features, but use | 187 | @file{cl-lib.el}. The two provide the same features (in most cases), |
| 188 | different function names (in fact, @file{cl.el} just defines aliases | 188 | but use different function names (in fact, @file{cl.el} mainly just |
| 189 | to the @file{cl-lib.el} definitions). In particular, the old @file{cl.el} | 189 | defines aliases to the @file{cl-lib.el} definitions). Where |
| 190 | does not use a clean namespace. For this reason, Emacs has a policy | 190 | @file{cl-lib.el} defines a function called, for example, |
| 191 | that packages distributed with Emacs must not load @code{cl} at run time. | 191 | @code{cl-incf}, @file{cl.el} uses the same name but without the |
| 192 | (It is ok for them to load @code{cl} at @emph{compile} time, with | 192 | @samp{cl-} prefix, e.g. @code{incf} in this example. There are a few |
| 193 | @code{eval-when-compile}, and use the macros it provides.) There is | 193 | exceptions to this. First, functions such as @code{cl-defun} where |
| 194 | no such restriction on the use of @code{cl-lib}. New code should use | 194 | the unprefixed version was already used for a standard Emacs Lisp |
| 195 | @code{cl-lib} rather than @code{cl}. @xref{Naming Conventions}. | 195 | function. In such cases, the @file{cl.el} version adds a @samp{*} |
| 196 | suffix, e.g. @code{defun*}. Second, there are some obsolete features | ||
| 197 | that are only implemented in @file{cl.el}, not in @file{cl-lib.el}, | ||
| 198 | because they are replaced by other standard Emacs Lisp features. | ||
| 199 | Finally, in a very few cases the old @file{cl.el} versions do not | ||
| 200 | behave in exactly the same way as the @file{cl-lib.el} versions. | ||
| 201 | @xref{Obsolete Features}. | ||
| 202 | |||
| 203 | Since the old @file{cl.el} does not use a clean namespace, Emacs has a | ||
| 204 | policy that packages distributed with Emacs must not load @code{cl} at | ||
| 205 | run time. (It is ok for them to load @code{cl} at @emph{compile} | ||
| 206 | time, with @code{eval-when-compile}, and use the macros it provides.) | ||
| 207 | There is no such restriction on the use of @code{cl-lib}. New code | ||
| 208 | should use @code{cl-lib} rather than @code{cl}. | ||
| 196 | 209 | ||
| 197 | There is one more file, @file{cl-compat.el}, which defines some | 210 | There is one more file, @file{cl-compat.el}, which defines some |
| 198 | routines from the older Quiroz CL package that are not otherwise | 211 | routines from the older Quiroz CL package that are not otherwise |
| @@ -4666,13 +4679,6 @@ referenced by @code{cl-return} or @code{cl-return-from} inside the block. | |||
| 4666 | Following is a list of all known incompatibilities between this | 4679 | Following is a list of all known incompatibilities between this |
| 4667 | package and Common Lisp as documented in Steele (2nd edition). | 4680 | package and Common Lisp as documented in Steele (2nd edition). |
| 4668 | 4681 | ||
| 4669 | @ignore | ||
| 4670 | Certain function names, such as @code{member}, @code{assoc}, and | ||
| 4671 | @code{floor}, were already taken by (incompatible) Emacs Lisp | ||
| 4672 | functions; this package appends @samp{*} to the names of its | ||
| 4673 | Common Lisp versions of these functions. | ||
| 4674 | @end ignore | ||
| 4675 | |||
| 4676 | The word @code{cl-defun} is required instead of @code{defun} in order | 4682 | The word @code{cl-defun} is required instead of @code{defun} in order |
| 4677 | to use extended Common Lisp argument lists in a function. Likewise, | 4683 | to use extended Common Lisp argument lists in a function. Likewise, |
| 4678 | @code{cl-defmacro} and @code{cl-function} are versions of those forms | 4684 | @code{cl-defmacro} and @code{cl-function} are versions of those forms |
| @@ -4684,6 +4690,7 @@ The @code{equal} predicate does not distinguish | |||
| 4684 | between IEEE floating-point plus and minus zero. The @code{cl-equalp} | 4690 | between IEEE floating-point plus and minus zero. The @code{cl-equalp} |
| 4685 | predicate has several differences with Common Lisp; @pxref{Predicates}. | 4691 | predicate has several differences with Common Lisp; @pxref{Predicates}. |
| 4686 | 4692 | ||
| 4693 | @c FIXME no longer provided by cl. | ||
| 4687 | The @code{setf} mechanism is entirely compatible, except that | 4694 | The @code{setf} mechanism is entirely compatible, except that |
| 4688 | setf-methods return a list of five values rather than five | 4695 | setf-methods return a list of five values rather than five |
| 4689 | values directly. Also, the new ``@code{setf} function'' concept | 4696 | values directly. Also, the new ``@code{setf} function'' concept |