diff options
| author | Dave Love | 2003-10-06 16:52:24 +0000 |
|---|---|---|
| committer | Dave Love | 2003-10-06 16:52:24 +0000 |
| commit | d7f29ece72eca0e84a87ae8f5961fb90ae151878 (patch) | |
| tree | 103b55ce722c1f8aff81dd1cc42620b6f2508987 | |
| parent | cf4ccadb2cf76538e319dcb294324f48d80cb40e (diff) | |
| download | emacs-d7f29ece72eca0e84a87ae8f5961fb90ae151878.tar.gz emacs-d7f29ece72eca0e84a87ae8f5961fb90ae151878.zip | |
Char-tables are sequences.
Add string-bytes.
| -rw-r--r-- | lispref/sequences.texi | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lispref/sequences.texi b/lispref/sequences.texi index e4503dd821f..75b4b31bebd 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, or | 72 | Returns @code{t} if @var{object} is a list, vector, |
| 73 | string, @code{nil} otherwise. | 73 | string, or char-table, @code{nil} otherwise. |
| 74 | @end defun | 74 | @end defun |
| 75 | 75 | ||
| 76 | @defun length sequence | 76 | @defun length sequence |
| @@ -78,10 +78,12 @@ string, @code{nil} otherwise. | |||
| 78 | @cindex list length | 78 | @cindex list length |
| 79 | @cindex vector length | 79 | @cindex vector length |
| 80 | @cindex sequence length | 80 | @cindex sequence length |
| 81 | @cindex char-table length | ||
| 81 | This function returns the number of elements in @var{sequence}. If | 82 | This function returns the number of elements in @var{sequence}. If |
| 82 | @var{sequence} is a cons cell that is not a list (because the final | 83 | @var{sequence} is a cons cell that is not a list (because the final |
| 83 | @sc{cdr} is not @code{nil}), a @code{wrong-type-argument} error is | 84 | @sc{cdr} is not @code{nil}), a @code{wrong-type-argument} error is |
| 84 | signaled. | 85 | signaled. For a char-table, the value returned is always one more |
| 86 | than the maximum Emacs character code. | ||
| 85 | 87 | ||
| 86 | @xref{List Elements}, for the related function @code{safe-length}. | 88 | @xref{List Elements}, for the related function @code{safe-length}. |
| 87 | 89 | ||
| @@ -109,6 +111,13 @@ signaled. | |||
| 109 | @end example | 111 | @end example |
| 110 | @end defun | 112 | @end defun |
| 111 | 113 | ||
| 114 | @defun string-bytes string | ||
| 115 | @cindex string, number of bytes | ||
| 116 | This function returns the number of bytes in @var{string}. | ||
| 117 | If @var{string} is a multibyte string, this is greater than | ||
| 118 | @code{(length @var{string})}. | ||
| 119 | @end defun | ||
| 120 | |||
| 112 | @defun elt sequence index | 121 | @defun elt sequence index |
| 113 | @cindex elements of sequences | 122 | @cindex elements of sequences |
| 114 | This function returns the element of @var{sequence} indexed by | 123 | This function returns the element of @var{sequence} indexed by |