comparison man/lispref/lists.texi @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3ecd8885ac67
children 576fb035e263
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
1446 @end smallexample 1446 @end smallexample
1447 @end defun 1447 @end defun
1448 1448
1449 @defun remassoc key alist 1449 @defun remassoc key alist
1450 This function deletes by side effect any associations with key @var{key} 1450 This function deletes by side effect any associations with key @var{key}
1451 in @var{alist} -- i.e. it removes any elements from @var{alist} whose 1451 in @var{alist}---i.e. it removes any elements from @var{alist} whose
1452 @code{car} is @code{equal} to @var{key}. The modified @var{alist} is 1452 @code{car} is @code{equal} to @var{key}. The modified @var{alist} is
1453 returned. 1453 returned.
1454 1454
1455 If the first member of @var{alist} has a @code{car} that is @code{equal} 1455 If the first member of @var{alist} has a @code{car} that is @code{equal}
1456 to @var{key}, there is no way to remove it by side effect; therefore, 1456 to @var{key}, there is no way to remove it by side effect; therefore,
1458 value of @code{foo}. 1458 value of @code{foo}.
1459 @end defun 1459 @end defun
1460 1460
1461 @defun remassq key alist 1461 @defun remassq key alist
1462 This function deletes by side effect any associations with key @var{key} 1462 This function deletes by side effect any associations with key @var{key}
1463 in @var{alist} -- i.e. it removes any elements from @var{alist} whose 1463 in @var{alist}---i.e. it removes any elements from @var{alist} whose
1464 @code{car} is @code{eq} to @var{key}. The modified @var{alist} is 1464 @code{car} is @code{eq} to @var{key}. The modified @var{alist} is
1465 returned. 1465 returned.
1466 1466
1467 This function is exactly like @code{remassoc}, but comparisons between 1467 This function is exactly like @code{remassoc}, but comparisons between
1468 @var{key} and keys in @var{alist} are done using @code{eq} instead of 1468 @var{key} and keys in @var{alist} are done using @code{eq} instead of
1469 @code{equal}. 1469 @code{equal}.
1470 @end defun 1470 @end defun
1471 1471
1472 @defun remrassoc value alist 1472 @defun remrassoc value alist
1473 This function deletes by side effect any associations with value @var{value} 1473 This function deletes by side effect any associations with value @var{value}
1474 in @var{alist} -- i.e. it removes any elements from @var{alist} whose 1474 in @var{alist}---i.e. it removes any elements from @var{alist} whose
1475 @code{cdr} is @code{equal} to @var{value}. The modified @var{alist} is 1475 @code{cdr} is @code{equal} to @var{value}. The modified @var{alist} is
1476 returned. 1476 returned.
1477 1477
1478 If the first member of @var{alist} has a @code{car} that is @code{equal} 1478 If the first member of @var{alist} has a @code{car} that is @code{equal}
1479 to @var{value}, there is no way to remove it by side effect; therefore, 1479 to @var{value}, there is no way to remove it by side effect; therefore,
1486 based on its value instead of its key. 1486 based on its value instead of its key.
1487 @end defun 1487 @end defun
1488 1488
1489 @defun remrassq value alist 1489 @defun remrassq value alist
1490 This function deletes by side effect any associations with value @var{value} 1490 This function deletes by side effect any associations with value @var{value}
1491 in @var{alist} -- i.e. it removes any elements from @var{alist} whose 1491 in @var{alist}---i.e. it removes any elements from @var{alist} whose
1492 @code{cdr} is @code{eq} to @var{value}. The modified @var{alist} is 1492 @code{cdr} is @code{eq} to @var{value}. The modified @var{alist} is
1493 returned. 1493 returned.
1494 1494
1495 This function is exactly like @code{remrassoc}, but comparisons between 1495 This function is exactly like @code{remrassoc}, but comparisons between
1496 @var{value} and values in @var{alist} are done using @code{eq} instead of 1496 @var{value} and values in @var{alist} are done using @code{eq} instead of
1769 Weak lists can be useful for keeping track of things such as unobtrusive 1769 Weak lists can be useful for keeping track of things such as unobtrusive
1770 lists of another function's buffers or markers. When that function is 1770 lists of another function's buffers or markers. When that function is
1771 done with the elements, they will automatically disappear from the list. 1771 done with the elements, they will automatically disappear from the list.
1772 1772
1773 Weak lists are used internally, for example, to manage the list holding 1773 Weak lists are used internally, for example, to manage the list holding
1774 the children of an extent -- an extent that is unused but has a parent 1774 the children of an extent---an extent that is unused but has a parent
1775 will still be reclaimed, and will automatically be removed from its 1775 will still be reclaimed, and will automatically be removed from its
1776 parent's list of children. 1776 parent's list of children.
1777 1777
1778 Weak lists are similar to weak hash tables (@pxref{Weak Hash Tables}). 1778 Weak lists are similar to weak hash tables (@pxref{Weak Hash Tables}).
1779 1779