diff options
| author | Luc Teirlinck | 2004-04-17 00:58:04 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-04-17 00:58:04 +0000 |
| commit | 3a424014a0c51bac48d79d4fb0e54a8ad77a7d2b (patch) | |
| tree | 8b87c9d18aa84cf4acfdcc8d994b47643ef21091 | |
| parent | 948caddf0be648b04ce072ed2750977b8bab5c4e (diff) | |
| download | emacs-3a424014a0c51bac48d79d4fb0e54a8ad77a7d2b.tar.gz emacs-3a424014a0c51bac48d79d4fb0e54a8ad77a7d2b.zip | |
Various clarifications.
| -rw-r--r-- | lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | lispref/sequences.texi | 34 |
2 files changed, 23 insertions, 15 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 6637064af48..1e04943f4f2 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-04-16 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * sequences.texi: Various clarifications. | ||
| 4 | |||
| 1 | 2004-04-14 Luc Teirlinck <teirllm@auburn.edu> | 5 | 2004-04-14 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 6 | ||
| 3 | * buffers.texi (Read Only Buffers): Mention optional ARG to | 7 | * buffers.texi (Read Only Buffers): Mention optional ARG to |
diff --git a/lispref/sequences.texi b/lispref/sequences.texi index 06ac8c5f569..a9f997a5b2c 100644 --- a/lispref/sequences.texi +++ b/lispref/sequences.texi | |||
| @@ -69,8 +69,8 @@ elements. This section describes functions that accept any kind of | |||
| 69 | sequence. | 69 | sequence. |
| 70 | 70 | ||
| 71 | @defun sequencep object | 71 | @defun sequencep object |
| 72 | Returns @code{t} if @var{object} is a list, vector, | 72 | Returns @code{t} if @var{object} is a list, vector, string, |
| 73 | string, bool-vector, or char-table, @code{nil} otherwise. | 73 | bool-vector, or char-table, @code{nil} otherwise. |
| 74 | @end defun | 74 | @end defun |
| 75 | 75 | ||
| 76 | @defun length sequence | 76 | @defun length sequence |
| @@ -80,12 +80,12 @@ string, bool-vector, or char-table, @code{nil} otherwise. | |||
| 80 | @cindex sequence length | 80 | @cindex sequence length |
| 81 | @cindex char-table length | 81 | @cindex char-table length |
| 82 | This function returns the number of elements in @var{sequence}. If | 82 | This function returns the number of elements in @var{sequence}. If |
| 83 | @var{sequence} is a cons cell that is not a list (because the final | 83 | @var{sequence} is a dotted list, a @code{wrong-type-argument} error is |
| 84 | @sc{cdr} is not @code{nil}), a @code{wrong-type-argument} error is | 84 | signaled. Circular lists may cause an infinite loop. For a |
| 85 | signaled. For a char-table, the value returned is always one more | 85 | char-table, the value returned is always one more than the maximum |
| 86 | than the maximum Emacs character code. | 86 | Emacs character code. |
| 87 | 87 | ||
| 88 | @xref{List Elements}, for the related function @code{safe-length}. | 88 | @xref{Definition of safe-length}, for the related function @code{safe-length}. |
| 89 | 89 | ||
| 90 | @example | 90 | @example |
| 91 | @group | 91 | @group |
| @@ -121,10 +121,11 @@ If @var{string} is a multibyte string, this is greater than | |||
| 121 | @defun elt sequence index | 121 | @defun elt sequence index |
| 122 | @cindex elements of sequences | 122 | @cindex elements of sequences |
| 123 | This function returns the element of @var{sequence} indexed by | 123 | This function returns the element of @var{sequence} indexed by |
| 124 | @var{index}. Legitimate values of @var{index} are integers ranging from | 124 | @var{index}. Legitimate values of @var{index} are integers ranging |
| 125 | 0 up to one less than the length of @var{sequence}. If @var{sequence} | 125 | from 0 up to one less than the length of @var{sequence}. If |
| 126 | is a list, then out-of-range values of @var{index} return @code{nil}; | 126 | @var{sequence} is a list, out-of-range values behave as for |
| 127 | otherwise, they trigger an @code{args-out-of-range} error. | 127 | @code{nth}. @xref{Definition of nth}. Otherwise, out-of-range values |
| 128 | trigger an @code{args-out-of-range} error. | ||
| 128 | 129 | ||
| 129 | @example | 130 | @example |
| 130 | @group | 131 | @group |
| @@ -151,7 +152,7 @@ otherwise, they trigger an @code{args-out-of-range} error. | |||
| 151 | @end example | 152 | @end example |
| 152 | 153 | ||
| 153 | This function generalizes @code{aref} (@pxref{Array Functions}) and | 154 | This function generalizes @code{aref} (@pxref{Array Functions}) and |
| 154 | @code{nth} (@pxref{List Elements}). | 155 | @code{nth} (@pxref{Definition of nth}). |
| 155 | @end defun | 156 | @end defun |
| 156 | 157 | ||
| 157 | @defun copy-sequence sequence | 158 | @defun copy-sequence sequence |
| @@ -171,6 +172,9 @@ the copy is itself a copy, not shared with the original's property | |||
| 171 | list. However, the actual values of the properties are shared. | 172 | list. However, the actual values of the properties are shared. |
| 172 | @xref{Text Properties}. | 173 | @xref{Text Properties}. |
| 173 | 174 | ||
| 175 | This function does not work for dotted lists. Trying to copy a | ||
| 176 | circular list may cause an infinite loop. | ||
| 177 | |||
| 174 | See also @code{append} in @ref{Building Lists}, @code{concat} in | 178 | See also @code{append} in @ref{Building Lists}, @code{concat} in |
| 175 | @ref{Creating Strings}, and @code{vconcat} in @ref{Vector Functions}, | 179 | @ref{Creating Strings}, and @code{vconcat} in @ref{Vector Functions}, |
| 176 | for other ways to copy sequences. | 180 | for other ways to copy sequences. |
| @@ -472,9 +476,9 @@ each initialized to @var{object}. | |||
| 472 | @defun vconcat &rest sequences | 476 | @defun vconcat &rest sequences |
| 473 | @cindex copying vectors | 477 | @cindex copying vectors |
| 474 | This function returns a new vector containing all the elements of the | 478 | This function returns a new vector containing all the elements of the |
| 475 | @var{sequences}. The arguments @var{sequences} may be any kind of | 479 | @var{sequences}. The arguments @var{sequences} may be true lists, |
| 476 | arrays, including lists, vectors, or strings. If no @var{sequences} are | 480 | vectors, strings or bool-vectors. If no @var{sequences} are given, an |
| 477 | given, an empty vector is returned. | 481 | empty vector is returned. |
| 478 | 482 | ||
| 479 | The value is a newly constructed vector that is not @code{eq} to any | 483 | The value is a newly constructed vector that is not @code{eq} to any |
| 480 | existing vector. | 484 | existing vector. |