aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-10-24 17:53:47 -0400
committerGlenn Morris2012-10-24 17:53:47 -0400
commita6880551db39f264286f6ba9bf9735665ea6b967 (patch)
treea15bb6af4ecf5bd363bf765dc36258abdfb85e0b
parent3c92de703166390edbbf9833f282342ce2306699 (diff)
downloademacs-a6880551db39f264286f6ba9bf9735665ea6b967.tar.gz
emacs-a6880551db39f264286f6ba9bf9735665ea6b967.zip
Remove some old information from cl.texi that is no longer relevant
* doc/misc/cl.texi (Overview, Multiple Values, Creating Symbols) (Numerical Functions): Say less/nothing about the original cl.el. (Old CL Compatibility): Remove. (Assertions): Remove ignore-errors (standard Elisp for some time).
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/cl.texi165
2 files changed, 19 insertions, 151 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 76859e09d42..a511ec3b75d 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,5 +1,10 @@
12012-10-24 Glenn Morris <rgm@gnu.org> 12012-10-24 Glenn Morris <rgm@gnu.org>
2 2
3 * cl.texi (Overview, Multiple Values, Creating Symbols)
4 (Numerical Functions): Say less/nothing about the original cl.el.
5 (Old CL Compatibility): Remove.
6 (Assertions): Remove ignore-errors (standard Elisp for some time).
7
3 * cl.texi (Basic Setf, Macros, Declarations, Symbols, Numbers) 8 * cl.texi (Basic Setf, Macros, Declarations, Symbols, Numbers)
4 (Sequences, Lists, Structures, Assertions, Efficiency Concerns) 9 (Sequences, Lists, Structures, Assertions, Efficiency Concerns)
5 (Efficiency Concerns, Efficiency Concerns) 10 (Efficiency Concerns, Efficiency Concerns)
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 5908e94be02..80fe5d2f1c8 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -65,11 +65,10 @@ developing GNU and promoting software freedom.''
65* Sequences:: Mapping, functions, searching, sorting. 65* Sequences:: Mapping, functions, searching, sorting.
66* Lists:: @code{cl-caddr}, @code{cl-sublis}, @code{cl-member}, @code{cl-assoc}, etc. 66* Lists:: @code{cl-caddr}, @code{cl-sublis}, @code{cl-member}, @code{cl-assoc}, etc.
67* Structures:: @code{cl-defstruct}. 67* Structures:: @code{cl-defstruct}.
68* Assertions:: @code{cl-check-type}, @code{cl-assert}, @code{ignore-errors}. 68* Assertions:: @code{cl-check-type}, @code{cl-assert}.
69 69
70* Efficiency Concerns:: Hints and techniques. 70* Efficiency Concerns:: Hints and techniques.
71* Common Lisp Compatibility:: All known differences with Steele. 71* Common Lisp Compatibility:: All known differences with Steele.
72* Old CL Compatibility:: All known differences with old cl.el.
73* Porting Common Lisp:: Hints for porting Common Lisp code. 72* Porting Common Lisp:: Hints for porting Common Lisp code.
74 73
75* GNU Free Documentation License:: The license for this documentation. 74* GNU Free Documentation License:: The license for this documentation.
@@ -118,13 +117,11 @@ features.
118 117
119The package described here was originally written by Dave Gillespie, 118The package described here was originally written by Dave Gillespie,
120@file{daveg@@synaptics.com}, as a total rewrite of an earlier 119@file{daveg@@synaptics.com}, as a total rewrite of an earlier
1211986 @file{cl.el} package by Cesar Quiroz. Most features of the 1201986 @file{cl.el} package by Cesar Quiroz. Care has been taken
122Quiroz package were retained; any incompatibilities are 121to ensure that each function is defined efficiently, concisely, and
123noted in the descriptions below. Care has been taken in this 122with minimal impact on the rest of the Emacs environment. Stefan
124version to ensure that each function is defined efficiently, 123Monnier added the file @file{cl-lib.el} and rationalized the namespace
125concisely, and with minimal impact on the rest of the Emacs 124for Emacs 24.3.
126environment. Stefan Monnier added the file @file{cl-lib.el} and
127rationalized the namespace for Emacs 24.3.
128 125
129@menu 126@menu
130* Usage:: How to use the CL package. 127* Usage:: How to use the CL package.
@@ -198,12 +195,9 @@ no such restriction on the use of @code{cl-lib}. New code should use
198@code{cl-lib} rather than @code{cl}. @xref{Naming Conventions}. 195@code{cl-lib} rather than @code{cl}. @xref{Naming Conventions}.
199 196
200There is one more file, @file{cl-compat.el}, which defines some 197There is one more file, @file{cl-compat.el}, which defines some
201routines from the older CL package that are not otherwise 198routines from the older Quiroz CL package that are not otherwise
202present in the new package. This includes internal routines 199present in the new package. This file is obsolete and should not be
203like @code{setelt} and @code{zip-lists}, deprecated features 200used in new code.
204like @code{defkeyword}, and an emulation of the old-style
205multiple-values feature. This file is obsolete and should not be used
206in new code. @xref{Old CL Compatibility}.
207 201
208@node Naming Conventions 202@node Naming Conventions
209@section Naming Conventions 203@section Naming Conventions
@@ -2875,13 +2869,6 @@ It then sets the @var{var}s to these respective values, as if by
2875in @code{cl-multiple-value-bind}. 2869in @code{cl-multiple-value-bind}.
2876@end defspec 2870@end defspec
2877 2871
2878The older Quiroz package attempted a more faithful (but still
2879imperfect) emulation of Common Lisp multiple values. The old
2880method ``usually'' simulated true multiple values quite well,
2881but under certain circumstances would leave spurious return
2882values in memory where a later, unrelated @code{cl-multiple-value-bind}
2883form would see them.
2884
2885Since a perfect emulation is not feasible in Emacs Lisp, this 2872Since a perfect emulation is not feasible in Emacs Lisp, this
2886package opts to keep it as simple and predictable as possible. 2873package opts to keep it as simple and predictable as possible.
2887 2874
@@ -3282,12 +3269,11 @@ exists, the function keeps incrementing the counter and trying
3282again until a new symbol is generated. 3269again until a new symbol is generated.
3283@end defun 3270@end defun
3284 3271
3285The Quiroz @file{cl.el} package also defined a @code{defkeyword} 3272This package automatically creates all keywords that are called for by
3286form for creating self-quoting keyword symbols. This package 3273@code{&key} argument specifiers, and discourages the use of keywords
3287automatically creates all keywords that are called for by 3274as data unrelated to keyword arguments, so the related function
3288@code{&key} argument specifiers, and discourages the use of 3275@code{defkeyword} (to create self-quoting keyword symbols) is not
3289keywords as data unrelated to keyword arguments, so the 3276provided.
3290@code{defkeyword} form has been discontinued.
3291 3277
3292@node Numbers 3278@node Numbers
3293@chapter Numbers 3279@chapter Numbers
@@ -3426,13 +3412,6 @@ This function returns the same value as the second return value
3426of @code{cl-truncate}. 3412of @code{cl-truncate}.
3427@end defun 3413@end defun
3428 3414
3429@c FIXME this stuff is probably no longer of interest to anyone.
3430These definitions are compatible with those in the Quiroz
3431@file{cl.el} package, except that
3432@c this package appends @samp{*} to certain function names to avoid
3433@c conflicts with existing Emacs functions, and that
3434the mechanism for returning multiple values is different.
3435
3436@iftex 3415@iftex
3437@secno=8 3416@secno=8
3438@end iftex 3417@end iftex
@@ -4752,18 +4731,6 @@ must be a @var{place} suitable for use by @code{setf}, because
4752user to modify @var{place}. 4731user to modify @var{place}.
4753@end defspec 4732@end defspec
4754 4733
4755The following error-related macro is also defined:
4756
4757@c FIXME standard for some time.
4758@defspec ignore-errors forms@dots{}
4759This executes @var{forms} exactly like a @code{progn}, except that
4760errors are ignored during the @var{forms}. More precisely, if
4761an error is signaled then @code{ignore-errors} immediately
4762aborts execution of the @var{forms} and returns @code{nil}.
4763If the @var{forms} complete successfully, @code{ignore-errors}
4764returns the result of the last @var{form}.
4765@end defspec
4766
4767@node Efficiency Concerns 4734@node Efficiency Concerns
4768@appendix Efficiency Concerns 4735@appendix Efficiency Concerns
4769 4736
@@ -4971,110 +4938,6 @@ special, distinct type. Also, the @code{:type} slot option is ignored.
4971 4938
4972The second argument of @code{cl-check-type} is treated differently. 4939The second argument of @code{cl-check-type} is treated differently.
4973 4940
4974@c FIXME Time to remove this?
4975@node Old CL Compatibility
4976@appendix Old CL Compatibility
4977
4978@noindent
4979Following is a list of all known incompatibilities between this package
4980and the older Quiroz @file{cl.el} package.
4981
4982This package's emulation of multiple return values in functions is
4983incompatible with that of the older package. That package attempted
4984to come as close as possible to true Common Lisp multiple return
4985values; unfortunately, it could not be 100% reliable and so was prone
4986to occasional surprises if used freely. This package uses a simpler
4987method, namely replacing multiple values with lists of values, which
4988is more predictable though more noticeably different from Common Lisp.
4989
4990The @code{defkeyword} form and @code{keywordp} function are not
4991implemented in this package.
4992
4993@ignore
4994The @code{member}, @code{floor}, @code{ceiling}, @code{truncate},
4995@code{round}, @code{mod}, and @code{rem} functions are suffixed
4996by @samp{*} in this package to avoid collision with existing
4997functions in Emacs. The older package simply
4998redefined these functions, overwriting the built-in meanings and
4999causing serious portability problems. (Some more
5000recent versions of the Quiroz package changed the names to
5001@code{cl-member}, etc.; this package defines the latter names as
5002aliases for @code{member*}, etc.)
5003@end ignore
5004
5005Certain functions in the old package which were buggy or inconsistent
5006with the Common Lisp standard are incompatible with the conforming
5007versions in this package. For example, @code{eql} and @code{member}
5008were synonyms for @code{eq} and @code{memq} in that package, @code{setf}
5009failed to preserve correct order of evaluation of its arguments, etc.
5010
5011Finally, unlike the older package, this package is careful to
5012prefix all of its internal names with @code{cl--}. Except for a
5013few functions which are explicitly defined as additional features
5014(such as @code{cl-floatp-safe} and @code{letf}), this package does not
5015export any non-@samp{cl-} symbols which are not also part of Common
5016Lisp.
5017
5018@ifinfo
5019@example
5020
5021@end example
5022@end ifinfo
5023@appendixsec The @code{cl-compat} package
5024
5025@noindent
5026The @code{CL} package includes emulations of some features of the
5027old @file{cl.el}, in the form of a compatibility package
5028@code{cl-compat}. This file is obsolete and may be removed in future,
5029so it should not be used in new code.
5030
5031The old package defined a number of internal routines without
5032@code{cl-} prefixes or other annotations. Call to these routines
5033may have crept into existing Lisp code. @code{cl-compat}
5034provides emulations of the following internal routines:
5035@code{pair-with-newsyms}, @code{zip-lists}, @code{unzip-lists},
5036@code{reassemble-arglists}, @code{duplicate-symbols-p},
5037@code{safe-idiv}.
5038
5039Some @code{setf} forms translated into calls to internal
5040functions that user code might call directly. The functions
5041@code{setnth}, @code{setnthcdr}, and @code{setelt} fall in
5042this category; they are defined by @code{cl-compat}, but the
5043best fix is to change to use @code{setf} properly.
5044
5045The @code{cl-compat} file defines the keyword functions
5046@code{keywordp}, @code{keyword-of}, and @code{defkeyword},
5047which are not defined by the new @code{CL} package because the
5048use of keywords as data is discouraged.
5049
5050The @code{build-klist} mechanism for parsing keyword arguments
5051is emulated by @code{cl-compat}; the @code{with-keyword-args}
5052macro is not, however, and in any case it's best to change to
5053use the more natural keyword argument processing offered by
5054@code{defun*}.
5055
5056Multiple return values are treated differently by the two
5057Common Lisp packages. The old package's method was more
5058compatible with true Common Lisp, though it used heuristics
5059that caused it to report spurious multiple return values in
5060certain cases. The @code{cl-compat} package defines a set
5061of multiple-value macros that are compatible with the old
5062CL package; again, they are heuristic in nature, but they
5063are guaranteed to work in any case where the old package's
5064macros worked. To avoid name collision with the ``official''
5065multiple-value facilities, the ones in @code{cl-compat} have
5066capitalized names: @code{Values}, @code{Values-list},
5067@code{Multiple-value-bind}, etc.
5068
5069The functions @code{cl-floor}, @code{cl-ceiling}, @code{cl-truncate},
5070and @code{cl-round} are defined by @code{cl-compat} to use the
5071old-style multiple-value mechanism, just as they did in the old
5072package. The newer @code{floor*} and friends return their two
5073results in a list rather than as multiple values. Note that
5074older versions of the old package used the unadorned names
5075@code{floor}, @code{ceiling}, etc.; @code{cl-compat} cannot use
5076these names because they conflict with Emacs built-ins.
5077
5078@node Porting Common Lisp 4941@node Porting Common Lisp
5079@appendix Porting Common Lisp 4942@appendix Porting Common Lisp
5080 4943