/[emacs]/emacs/lispref/lists.texi
ViewVC logotype

Diff of /emacs/lispref/lists.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by rms, Fri Sep 12 01:03:37 2003 UTC revision 1.38 by rms, Tue Sep 30 13:00:23 2003 UTC
# Line 1670  the associations of one copy without aff Line 1670  the associations of one copy without aff
1670  @defun assq-delete-all key alist  @defun assq-delete-all key alist
1671  @tindex assq-delete-all  @tindex assq-delete-all
1672  This function deletes from @var{alist} all the elements whose @sc{car}  This function deletes from @var{alist} all the elements whose @sc{car}
1673  is @code{eq} to @var{key}.  It returns @var{alist}, modified  is @code{eq} to @var{key}, much as if you used @code{delq} to delete
1674  in this way.  Note that it modifies the original list structure  such each element one by one.  It returns the shortened alist, and
1675  of @var{alist}.  often modifies the original list structure of @var{alist}.  For
1676    correct results, use the return value of @code{assq-delete-all} rather
1677    than looking at the saved value of @var{alist}.
1678    
1679  @example  @example
1680  (assq-delete-all 'foo  (setq alist '((foo 1) (bar 2) (foo 3) (lose 4)))
1681                   '((foo 1) (bar 2) (foo 3) (lose 4)))       @result{} ((foo 1) (bar 2) (foo 3) (lose 4))
1682    (assq-delete-all 'foo alist)
1683       @result{} ((bar 2) (lose 4))       @result{} ((bar 2) (lose 4))
1684    alist
1685         @result{} ((foo 1) (bar 2) (lose 4))
1686  @end example  @end example
1687  @end defun  @end defun
1688    

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26