diff options
| author | Glenn Morris | 2012-10-24 17:53:47 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-10-24 17:53:47 -0400 |
| commit | a6880551db39f264286f6ba9bf9735665ea6b967 (patch) | |
| tree | a15bb6af4ecf5bd363bf765dc36258abdfb85e0b | |
| parent | 3c92de703166390edbbf9833f282342ce2306699 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/cl.texi | 165 |
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 @@ | |||
| 1 | 2012-10-24 Glenn Morris <rgm@gnu.org> | 1 | 2012-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 | ||
| 119 | The package described here was originally written by Dave Gillespie, | 118 | The 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 |
| 121 | 1986 @file{cl.el} package by Cesar Quiroz. Most features of the | 120 | 1986 @file{cl.el} package by Cesar Quiroz. Care has been taken |
| 122 | Quiroz package were retained; any incompatibilities are | 121 | to ensure that each function is defined efficiently, concisely, and |
| 123 | noted in the descriptions below. Care has been taken in this | 122 | with minimal impact on the rest of the Emacs environment. Stefan |
| 124 | version to ensure that each function is defined efficiently, | 123 | Monnier added the file @file{cl-lib.el} and rationalized the namespace |
| 125 | concisely, and with minimal impact on the rest of the Emacs | 124 | for Emacs 24.3. |
| 126 | environment. Stefan Monnier added the file @file{cl-lib.el} and | ||
| 127 | rationalized 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 | ||
| 200 | There is one more file, @file{cl-compat.el}, which defines some | 197 | There is one more file, @file{cl-compat.el}, which defines some |
| 201 | routines from the older CL package that are not otherwise | 198 | routines from the older Quiroz CL package that are not otherwise |
| 202 | present in the new package. This includes internal routines | 199 | present in the new package. This file is obsolete and should not be |
| 203 | like @code{setelt} and @code{zip-lists}, deprecated features | 200 | used in new code. |
| 204 | like @code{defkeyword}, and an emulation of the old-style | ||
| 205 | multiple-values feature. This file is obsolete and should not be used | ||
| 206 | in 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 | |||
| 2875 | in @code{cl-multiple-value-bind}. | 2869 | in @code{cl-multiple-value-bind}. |
| 2876 | @end defspec | 2870 | @end defspec |
| 2877 | 2871 | ||
| 2878 | The older Quiroz package attempted a more faithful (but still | ||
| 2879 | imperfect) emulation of Common Lisp multiple values. The old | ||
| 2880 | method ``usually'' simulated true multiple values quite well, | ||
| 2881 | but under certain circumstances would leave spurious return | ||
| 2882 | values in memory where a later, unrelated @code{cl-multiple-value-bind} | ||
| 2883 | form would see them. | ||
| 2884 | |||
| 2885 | Since a perfect emulation is not feasible in Emacs Lisp, this | 2872 | Since a perfect emulation is not feasible in Emacs Lisp, this |
| 2886 | package opts to keep it as simple and predictable as possible. | 2873 | package 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 | |||
| 3282 | again until a new symbol is generated. | 3269 | again until a new symbol is generated. |
| 3283 | @end defun | 3270 | @end defun |
| 3284 | 3271 | ||
| 3285 | The Quiroz @file{cl.el} package also defined a @code{defkeyword} | 3272 | This package automatically creates all keywords that are called for by |
| 3286 | form for creating self-quoting keyword symbols. This package | 3273 | @code{&key} argument specifiers, and discourages the use of keywords |
| 3287 | automatically creates all keywords that are called for by | 3274 | as 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 |
| 3289 | keywords as data unrelated to keyword arguments, so the | 3276 | provided. |
| 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 | |||
| 3426 | of @code{cl-truncate}. | 3412 | of @code{cl-truncate}. |
| 3427 | @end defun | 3413 | @end defun |
| 3428 | 3414 | ||
| 3429 | @c FIXME this stuff is probably no longer of interest to anyone. | ||
| 3430 | These 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 | ||
| 3434 | the 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 | |||
| 4752 | user to modify @var{place}. | 4731 | user to modify @var{place}. |
| 4753 | @end defspec | 4732 | @end defspec |
| 4754 | 4733 | ||
| 4755 | The following error-related macro is also defined: | ||
| 4756 | |||
| 4757 | @c FIXME standard for some time. | ||
| 4758 | @defspec ignore-errors forms@dots{} | ||
| 4759 | This executes @var{forms} exactly like a @code{progn}, except that | ||
| 4760 | errors are ignored during the @var{forms}. More precisely, if | ||
| 4761 | an error is signaled then @code{ignore-errors} immediately | ||
| 4762 | aborts execution of the @var{forms} and returns @code{nil}. | ||
| 4763 | If the @var{forms} complete successfully, @code{ignore-errors} | ||
| 4764 | returns 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 | ||
| 4972 | The second argument of @code{cl-check-type} is treated differently. | 4939 | The 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 | ||
| 4979 | Following is a list of all known incompatibilities between this package | ||
| 4980 | and the older Quiroz @file{cl.el} package. | ||
| 4981 | |||
| 4982 | This package's emulation of multiple return values in functions is | ||
| 4983 | incompatible with that of the older package. That package attempted | ||
| 4984 | to come as close as possible to true Common Lisp multiple return | ||
| 4985 | values; unfortunately, it could not be 100% reliable and so was prone | ||
| 4986 | to occasional surprises if used freely. This package uses a simpler | ||
| 4987 | method, namely replacing multiple values with lists of values, which | ||
| 4988 | is more predictable though more noticeably different from Common Lisp. | ||
| 4989 | |||
| 4990 | The @code{defkeyword} form and @code{keywordp} function are not | ||
| 4991 | implemented in this package. | ||
| 4992 | |||
| 4993 | @ignore | ||
| 4994 | The @code{member}, @code{floor}, @code{ceiling}, @code{truncate}, | ||
| 4995 | @code{round}, @code{mod}, and @code{rem} functions are suffixed | ||
| 4996 | by @samp{*} in this package to avoid collision with existing | ||
| 4997 | functions in Emacs. The older package simply | ||
| 4998 | redefined these functions, overwriting the built-in meanings and | ||
| 4999 | causing serious portability problems. (Some more | ||
| 5000 | recent versions of the Quiroz package changed the names to | ||
| 5001 | @code{cl-member}, etc.; this package defines the latter names as | ||
| 5002 | aliases for @code{member*}, etc.) | ||
| 5003 | @end ignore | ||
| 5004 | |||
| 5005 | Certain functions in the old package which were buggy or inconsistent | ||
| 5006 | with the Common Lisp standard are incompatible with the conforming | ||
| 5007 | versions in this package. For example, @code{eql} and @code{member} | ||
| 5008 | were synonyms for @code{eq} and @code{memq} in that package, @code{setf} | ||
| 5009 | failed to preserve correct order of evaluation of its arguments, etc. | ||
| 5010 | |||
| 5011 | Finally, unlike the older package, this package is careful to | ||
| 5012 | prefix all of its internal names with @code{cl--}. Except for a | ||
| 5013 | few functions which are explicitly defined as additional features | ||
| 5014 | (such as @code{cl-floatp-safe} and @code{letf}), this package does not | ||
| 5015 | export any non-@samp{cl-} symbols which are not also part of Common | ||
| 5016 | Lisp. | ||
| 5017 | |||
| 5018 | @ifinfo | ||
| 5019 | @example | ||
| 5020 | |||
| 5021 | @end example | ||
| 5022 | @end ifinfo | ||
| 5023 | @appendixsec The @code{cl-compat} package | ||
| 5024 | |||
| 5025 | @noindent | ||
| 5026 | The @code{CL} package includes emulations of some features of the | ||
| 5027 | old @file{cl.el}, in the form of a compatibility package | ||
| 5028 | @code{cl-compat}. This file is obsolete and may be removed in future, | ||
| 5029 | so it should not be used in new code. | ||
| 5030 | |||
| 5031 | The old package defined a number of internal routines without | ||
| 5032 | @code{cl-} prefixes or other annotations. Call to these routines | ||
| 5033 | may have crept into existing Lisp code. @code{cl-compat} | ||
| 5034 | provides 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 | |||
| 5039 | Some @code{setf} forms translated into calls to internal | ||
| 5040 | functions that user code might call directly. The functions | ||
| 5041 | @code{setnth}, @code{setnthcdr}, and @code{setelt} fall in | ||
| 5042 | this category; they are defined by @code{cl-compat}, but the | ||
| 5043 | best fix is to change to use @code{setf} properly. | ||
| 5044 | |||
| 5045 | The @code{cl-compat} file defines the keyword functions | ||
| 5046 | @code{keywordp}, @code{keyword-of}, and @code{defkeyword}, | ||
| 5047 | which are not defined by the new @code{CL} package because the | ||
| 5048 | use of keywords as data is discouraged. | ||
| 5049 | |||
| 5050 | The @code{build-klist} mechanism for parsing keyword arguments | ||
| 5051 | is emulated by @code{cl-compat}; the @code{with-keyword-args} | ||
| 5052 | macro is not, however, and in any case it's best to change to | ||
| 5053 | use the more natural keyword argument processing offered by | ||
| 5054 | @code{defun*}. | ||
| 5055 | |||
| 5056 | Multiple return values are treated differently by the two | ||
| 5057 | Common Lisp packages. The old package's method was more | ||
| 5058 | compatible with true Common Lisp, though it used heuristics | ||
| 5059 | that caused it to report spurious multiple return values in | ||
| 5060 | certain cases. The @code{cl-compat} package defines a set | ||
| 5061 | of multiple-value macros that are compatible with the old | ||
| 5062 | CL package; again, they are heuristic in nature, but they | ||
| 5063 | are guaranteed to work in any case where the old package's | ||
| 5064 | macros worked. To avoid name collision with the ``official'' | ||
| 5065 | multiple-value facilities, the ones in @code{cl-compat} have | ||
| 5066 | capitalized names: @code{Values}, @code{Values-list}, | ||
| 5067 | @code{Multiple-value-bind}, etc. | ||
| 5068 | |||
| 5069 | The functions @code{cl-floor}, @code{cl-ceiling}, @code{cl-truncate}, | ||
| 5070 | and @code{cl-round} are defined by @code{cl-compat} to use the | ||
| 5071 | old-style multiple-value mechanism, just as they did in the old | ||
| 5072 | package. The newer @code{floor*} and friends return their two | ||
| 5073 | results in a list rather than as multiple values. Note that | ||
| 5074 | older versions of the old package used the unadorned names | ||
| 5075 | @code{floor}, @code{ceiling}, etc.; @code{cl-compat} cannot use | ||
| 5076 | these 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 | ||