summaryrefslogtreecommitdiff
path: root/doc/lispref/lists.texi
diff options
context:
space:
mode:
authortino calancha <tino.calancha@gmail.com>2018-01-28 13:05:54 +0900
committertino calancha <tino.calancha@gmail.com>2018-01-28 13:05:54 +0900
commit9824885fabea53f8c4461d038f4c1edad1b8f591 (patch)
treeaa19118775e261b24e796ff54d28cd74b76a7d43 /doc/lispref/lists.texi
parent26ee371d6dc7bd650db003a3bb62c11474373036 (diff)
downloademacs-9824885fabea53f8c4461d038f4c1edad1b8f591.tar.gz
Code refactoring assoc-delete-all assq-delete-all
* lisp/subr.el (assoc-delete-all): Add optional arg TEST. (assq-delete-all): Use assoc-delete-all. * test/lisp/subr-tests.el (subr-tests--assoc-delete-all) (subr-tests--assq-delete-all): New tests. * doc/lispref/lists.texi (Association Lists): Document assoc-delete-all in the manual. ; * etc/NEWS: Announce assoc-delete-all.
Diffstat (limited to 'doc/lispref/lists.texi')
-rw-r--r--doc/lispref/lists.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 3e2dd13c706..761750eb20c 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1733,6 +1733,14 @@ alist
@end example
@end defun
+@defun assoc-delete-all key alist &optional test
+This function is like @code{assq-delete-all} except that it accepts
+an optional argument @var{test}, a predicate function to compare the
+keys in @var{alist}. If omitted or @code{nil}, @var{test} defaults to
+@code{equal}. As @code{assq-delete-all}, this function often modifies
+the original list structure of @var{alist}.
+@end defun
+
@defun rassq-delete-all value alist
This function deletes from @var{alist} all the elements whose @sc{cdr}
is @code{eq} to @var{value}. It returns the shortened alist, and