Mercurial > hg > xemacs-beta
comparison man/lispref/lists.texi @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 74fd4e045ea6 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
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 |
1626 @end defun | 1626 @end defun |
1627 | 1627 |
1628 In the following functions, if optional arg @var{nil-means-not-present} | 1628 In the following functions, if optional arg @var{nil-means-not-present} |
1629 is non-@code{nil}, then a property with a @code{nil} value is ignored or | 1629 is non-@code{nil}, then a property with a @code{nil} value is ignored or |
1630 removed. This feature is a virus that has infected old Lisp | 1630 removed. This feature is a virus that has infected old Lisp |
1631 implementations (and thus E-Lisp, due to @sc{rms}'s enamorment with old | 1631 implementations (and thus E-Lisp, due to @sc{RMS}'s enamorment with old |
1632 Lisps), but should not be used except for backward compatibility. | 1632 Lisps), but should not be used except for backward compatibility. |
1633 | 1633 |
1634 @defun plists-eq a b &optional nil-means-not-present | 1634 @defun plists-eq a b &optional nil-means-not-present |
1635 This function returns non-@code{nil} if property lists A and B are | 1635 This function returns non-@code{nil} if property lists A and B are |
1636 @code{eq} (i.e. their values are @code{eq}). | 1636 @code{eq} (i.e. their values are @code{eq}). |
1680 @end defun | 1680 @end defun |
1681 | 1681 |
1682 In the following functions, if optional arg @var{nil-means-not-present} | 1682 In the following functions, if optional arg @var{nil-means-not-present} |
1683 is non-@code{nil}, then a property with a @code{nil} value is ignored or | 1683 is non-@code{nil}, then a property with a @code{nil} value is ignored or |
1684 removed. This feature is a virus that has infected old Lisp | 1684 removed. This feature is a virus that has infected old Lisp |
1685 implementations (and thus E-Lisp, due to @sc{rms}'s enamorment with old | 1685 implementations (and thus E-Lisp, due to @sc{RMS}'s enamorment with old |
1686 Lisps), but should not be used except for backward compatibility. | 1686 Lisps), but should not be used except for backward compatibility. |
1687 | 1687 |
1688 @defun lax-plists-eq a b &optional nil-means-not-present | 1688 @defun lax-plists-eq a b &optional nil-means-not-present |
1689 This function returns non-@code{nil} if lax property lists A and B are | 1689 This function returns non-@code{nil} if lax property lists A and B are |
1690 @code{eq} (i.e. their values are @code{eq}; their keys are still | 1690 @code{eq} (i.e. their values are @code{eq}; their keys are still |
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 |