diff options
| author | Luc Teirlinck | 2005-06-19 21:03:14 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-06-19 21:03:14 +0000 |
| commit | 0ff13af938126dca16ec0e1e80e3ac38e177e5d3 (patch) | |
| tree | 57cb593c100d9fa96475b9c4bd28660cf10bbf70 | |
| parent | 84398baa931d888a76e7bc77a8f84824465805ba (diff) | |
| download | emacs-0ff13af938126dca16ec0e1e80e3ac38e177e5d3.tar.gz emacs-0ff13af938126dca16ec0e1e80e3ac38e177e5d3.zip | |
(Rings): Various minor clarifications and corrections.
| -rw-r--r-- | lispref/lists.texi | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lispref/lists.texi b/lispref/lists.texi index 02a900e3e00..a5a2c33bcce 100644 --- a/lispref/lists.texi +++ b/lispref/lists.texi | |||
| @@ -715,7 +715,7 @@ Some examples: | |||
| 715 | primitives @code{setcar} and @code{setcdr}. We call these ``destructive'' | 715 | primitives @code{setcar} and @code{setcdr}. We call these ``destructive'' |
| 716 | operations because they change existing list structure. | 716 | operations because they change existing list structure. |
| 717 | 717 | ||
| 718 | @cindex CL note---@code{rplaca} vrs @code{setcar} | 718 | @cindex CL note---@code{rplaca} vs @code{setcar} |
| 719 | @quotation | 719 | @quotation |
| 720 | @findex rplaca | 720 | @findex rplaca |
| 721 | @findex rplacd | 721 | @findex rplacd |
| @@ -1691,7 +1691,7 @@ This returns a new ring capable of holding @var{size} objects. | |||
| 1691 | @end defun | 1691 | @end defun |
| 1692 | 1692 | ||
| 1693 | @defun ring-p object | 1693 | @defun ring-p object |
| 1694 | This returns @code{t} if @var{object} is a ring. | 1694 | This returns @code{t} if @var{object} is a ring, @code{nil} otherwise. |
| 1695 | @end defun | 1695 | @end defun |
| 1696 | 1696 | ||
| 1697 | @defun ring-size ring | 1697 | @defun ring-size ring |
| @@ -1710,16 +1710,17 @@ order. | |||
| 1710 | 1710 | ||
| 1711 | @defun ring-copy ring | 1711 | @defun ring-copy ring |
| 1712 | This returns a new ring which is a copy of @var{ring}. | 1712 | This returns a new ring which is a copy of @var{ring}. |
| 1713 | The new ring contains the same objects as @var{ring}. | 1713 | The new ring contains the same (@code{eq}) objects as @var{ring}. |
| 1714 | @end defun | 1714 | @end defun |
| 1715 | 1715 | ||
| 1716 | @defun ring-empty-p ring | 1716 | @defun ring-empty-p ring |
| 1717 | This returns @code{t} if @var{ring} is empty. | 1717 | This returns @code{t} if @var{ring} is empty, @code{nil} otherwise. |
| 1718 | @end defun | 1718 | @end defun |
| 1719 | 1719 | ||
| 1720 | The newest element in the ring always has index 0. Higher indexes | 1720 | The newest element in the ring always has index 0. Higher indices |
| 1721 | correspond to older elements. Index @minus{}1 corresponds to the | 1721 | correspond to older elements. Indices are computed modulo the ring |
| 1722 | oldest element, @minus{}2 to the next-oldest, and so forth. | 1722 | length. Index @minus{}1 corresponds to the oldest element, @minus{}2 |
| 1723 | to the next-oldest, and so forth. | ||
| 1723 | 1724 | ||
| 1724 | @defun ring-ref ring index | 1725 | @defun ring-ref ring index |
| 1725 | This returns the object in @var{ring} found at index @var{index}. | 1726 | This returns the object in @var{ring} found at index @var{index}. |
| @@ -1744,7 +1745,7 @@ empty, @code{ring-remove} signals an error. | |||
| 1744 | 1745 | ||
| 1745 | @defun ring-insert-at-beginning ring object | 1746 | @defun ring-insert-at-beginning ring object |
| 1746 | This inserts @var{object} into @var{ring}, treating it as the oldest | 1747 | This inserts @var{object} into @var{ring}, treating it as the oldest |
| 1747 | element, and returns @var{object}. | 1748 | element. The return value is not significant. |
| 1748 | 1749 | ||
| 1749 | If the ring is full, this function removes the newest element to make | 1750 | If the ring is full, this function removes the newest element to make |
| 1750 | room for the inserted element. | 1751 | room for the inserted element. |