aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-12-29 21:24:11 +0000
committerRichard M. Stallman2003-12-29 21:24:11 +0000
commit9f0812867abf2b6b3809a71304e6579d9ae32cbe (patch)
treefc163c044529c6513426e910eb006312cfdd6deb
parent5b2279a391d8b6a89dac513a9a5e38667820b820 (diff)
downloademacs-9f0812867abf2b6b3809a71304e6579d9ae32cbe.tar.gz
emacs-9f0812867abf2b6b3809a71304e6579d9ae32cbe.zip
(Building Lists): remq moved elsewhere.
(Sets And Lists): remq moved here. (Association Lists): Refer to assoc-string.
-rw-r--r--lispref/lists.texi62
1 files changed, 31 insertions, 31 deletions
diff --git a/lispref/lists.texi b/lispref/lists.texi
index 885d1e07f28..b123de5ab10 100644
--- a/lispref/lists.texi
+++ b/lispref/lists.texi
@@ -707,31 +707,6 @@ x
707@end example 707@end example
708@end defun 708@end defun
709 709
710@defun remq object list
711This function returns a copy of @var{list}, with all elements removed
712which are @code{eq} to @var{object}. The letter @samp{q} in @code{remq}
713says that it uses @code{eq} to compare @var{object} against the elements
714of @code{list}.
715
716@example
717@group
718(setq sample-list '(a b c a b c))
719 @result{} (a b c a b c)
720@end group
721@group
722(remq 'a sample-list)
723 @result{} (b c b c)
724@end group
725@group
726sample-list
727 @result{} (a b c a b c)
728@end group
729@end example
730@noindent
731The function @code{delq} offers a way to perform this operation
732destructively. See @ref{Sets And Lists}.
733@end defun
734
735@defun copy-tree tree &optional vecp 710@defun copy-tree tree &optional vecp
736This function returns a copy the tree @code{tree}. If @var{tree} is a 711This function returns a copy the tree @code{tree}. If @var{tree} is a
737cons cell, this makes a new cons cell with the same @sc{car} and 712cons cell, this makes a new cons cell with the same @sc{car} and
@@ -1346,9 +1321,34 @@ and the @code{(4)} in the @code{sample-list} are not @code{eq}:
1346@end group 1321@end group
1347@end example 1322@end example
1348 1323
1349The following two functions are like @code{memq} and @code{delq} but use 1324@defun remq object list
1350@code{equal} rather than @code{eq} to compare elements. @xref{Equality 1325This function returns a copy of @var{list}, with all elements removed
1351Predicates}. 1326which are @code{eq} to @var{object}. The letter @samp{q} in @code{remq}
1327says that it uses @code{eq} to compare @var{object} against the elements
1328of @code{list}.
1329
1330@example
1331@group
1332(setq sample-list '(a b c a b c))
1333 @result{} (a b c a b c)
1334@end group
1335@group
1336(remq 'a sample-list)
1337 @result{} (b c b c)
1338@end group
1339@group
1340sample-list
1341 @result{} (a b c a b c)
1342@end group
1343@end example
1344@noindent
1345The function @code{delq} offers a way to perform this operation
1346destructively. See @ref{Sets And Lists}.
1347@end defun
1348
1349The following three functions are like @code{memq}, @code{delq} and
1350@code{remq}, but use @code{equal} rather than @code{eq} to compare
1351elements. @xref{Equality Predicates}.
1352 1352
1353@defun member object list 1353@defun member object list
1354The function @code{member} tests to see whether @var{object} is a member 1354The function @code{member} tests to see whether @var{object} is a member
@@ -1541,9 +1541,9 @@ Here is another example, in which the keys and values are not symbols:
1541@end smallexample 1541@end smallexample
1542@end defun 1542@end defun
1543 1543
1544 The functions @code{assoc-ignore-representation} and 1544 The function @code{assoc-string} is much like @code{assoc} except
1545@code{assoc-ignore-case} are much like @code{assoc} except using 1545that it ignores certain differences between strings. @xref{Text
1546@code{compare-strings} to do the comparison. @xref{Text Comparison}. 1546Comparison}.
1547 1547
1548@defun rassoc value alist 1548@defun rassoc value alist
1549This function returns the first association with value @var{value} in 1549This function returns the first association with value @var{value} in