diff options
Diffstat (limited to 'doc/lispref/lists.texi')
-rw-r--r-- | doc/lispref/lists.texi | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index ce62793550d..1548dd49b2f 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -156,6 +156,22 @@ considered a list and @code{not} when it is considered a truth value @end example @end defun +@defun proper-list-p object +This function returns the length of @var{object} if it is a proper +list, @code{nil} otherwise (@pxref{Cons Cells}). In addition to +satisfying @code{listp}, a proper list is neither circular nor dotted. + +@example +@group +(proper-list-p '(a b c)) + @result{} 3 +@end group +@group +(proper-list-p '(a b . c)) + @result{} nil +@end group +@end example +@end defun @node List Elements @section Accessing Elements of Lists @@ -1144,7 +1160,7 @@ each time you run it! Here is what happens: @group (symbol-function 'add-foo) - @result{} (lambda (x) (nconc (quote (foo)) x)) + @result{} (lambda (x) (nconc '(foo) x)) @end group @group @@ -1162,7 +1178,7 @@ each time you run it! Here is what happens: @group (symbol-function 'add-foo) - @result{} (lambda (x) (nconc (quote (foo 1 2 3 4) x))) + @result{} (lambda (x) (nconc '(foo 1 2 3 4) x)) @end group @end smallexample @end defun @@ -1736,11 +1752,12 @@ alist @end example @end defun -@defun assoc-delete-all key alist -This function deletes from @var{alist} all the elements whose @sc{car} -is @code{equal} to @var{key}. It works like @code{assq-delete-all}, -except for the predicate used for comparing alist elements with -@var{key}. +@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 |