summaryrefslogtreecommitdiff
path: root/lispref/lists.texi
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2006-11-06 16:12:15 +0000
committerRichard M. Stallman <rms@gnu.org>2006-11-06 16:12:15 +0000
commit5da6be58a0e72a9f7164d8f3a51c2f7f0b3d5155 (patch)
tree2e96273cd2781545e8a72755e2ff8edcb097352f /lispref/lists.texi
parent002732bb52d971016f0d8610974df9c2271440e8 (diff)
(List Variables): Document COMPARE-FN.
Diffstat (limited to 'lispref/lists.texi')
-rw-r--r--lispref/lists.texi6
1 files changed, 4 insertions, 2 deletions
diff --git a/lispref/lists.texi b/lispref/lists.texi
index 62c7600fd1..cf72541389 100644
--- a/lispref/lists.texi
+++ b/lispref/lists.texi
@@ -713,12 +713,14 @@ l
Two functions modify lists that are the values of variables.
-@defun add-to-list symbol element &optional append
+@defun add-to-list symbol element &optional append compare-fn
This function sets the variable @var{symbol} by consing @var{element}
onto the old value, if @var{element} is not already a member of that
value. It returns the resulting list, whether updated or not. The
value of @var{symbol} had better be a list already before the call.
-Membership is tested using @code{equal}.
+@code{add-to-list} uses @var{compare-fn} to compare @var{element}
+against existing list members; if @var{compare-fn} is @code{nil}, it
+uses @code{equal}.
Normally, if @var{element} is added, it is added to the front of
@var{symbol}, but if the optional argument @var{append} is