aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2005-06-19 21:03:14 +0000
committerLuc Teirlinck2005-06-19 21:03:14 +0000
commit0ff13af938126dca16ec0e1e80e3ac38e177e5d3 (patch)
tree57cb593c100d9fa96475b9c4bd28660cf10bbf70
parent84398baa931d888a76e7bc77a8f84824465805ba (diff)
downloademacs-0ff13af938126dca16ec0e1e80e3ac38e177e5d3.tar.gz
emacs-0ff13af938126dca16ec0e1e80e3ac38e177e5d3.zip
(Rings): Various minor clarifications and corrections.
-rw-r--r--lispref/lists.texi17
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:
715primitives @code{setcar} and @code{setcdr}. We call these ``destructive'' 715primitives @code{setcar} and @code{setcdr}. We call these ``destructive''
716operations because they change existing list structure. 716operations 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
1694This returns @code{t} if @var{object} is a ring. 1694This 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
1712This returns a new ring which is a copy of @var{ring}. 1712This returns a new ring which is a copy of @var{ring}.
1713The new ring contains the same objects as @var{ring}. 1713The 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
1717This returns @code{t} if @var{ring} is empty. 1717This 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
1721correspond to older elements. Index @minus{}1 corresponds to the 1721correspond to older elements. Indices are computed modulo the ring
1722oldest element, @minus{}2 to the next-oldest, and so forth. 1722length. Index @minus{}1 corresponds to the oldest element, @minus{}2
1723to the next-oldest, and so forth.
1723 1724
1724@defun ring-ref ring index 1725@defun ring-ref ring index
1725This returns the object in @var{ring} found at index @var{index}. 1726This 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
1746This inserts @var{object} into @var{ring}, treating it as the oldest 1747This inserts @var{object} into @var{ring}, treating it as the oldest
1747element, and returns @var{object}. 1748element. The return value is not significant.
1748 1749
1749If the ring is full, this function removes the newest element to make 1750If the ring is full, this function removes the newest element to make
1750room for the inserted element. 1751room for the inserted element.