aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2020-04-29 17:52:53 +0300
committerEli Zaretskii2020-04-29 17:52:53 +0300
commit274ec97e3c65ab082264867ba3531cb853f491a9 (patch)
tree2cb7b396b7c31683521c9c880f61fa8a2f22ef0d /src
parent2f9bfaef21043d7894334b33b8538a165250f499 (diff)
downloademacs-274ec97e3c65ab082264867ba3531cb853f491a9.tar.gz
emacs-274ec97e3c65ab082264867ba3531cb853f491a9.zip
Make sure alist-related functions say so in their doc
* src/fns.c (Fassq, assq_no_quit, Fassoc, assoc_no_quit, Frassq) (Frassoc): Rename argument LIST to ALIST. Doc strings updated.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/fns.c b/src/fns.c
index 3b5feace521..392196e2c7a 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1604,16 +1604,16 @@ The value is actually the tail of LIST whose car is ELT. */)
1604} 1604}
1605 1605
1606DEFUN ("assq", Fassq, Sassq, 2, 2, 0, 1606DEFUN ("assq", Fassq, Sassq, 2, 2, 0,
1607 doc: /* Return non-nil if KEY is `eq' to the car of an element of LIST. 1607 doc: /* Return non-nil if KEY is `eq' to the car of an element of ALIST.
1608The value is actually the first element of LIST whose car is KEY. 1608The value is actually the first element of ALIST whose car is KEY.
1609Elements of LIST that are not conses are ignored. */) 1609Elements of ALIST that are not conses are ignored. */)
1610 (Lisp_Object key, Lisp_Object list) 1610 (Lisp_Object key, Lisp_Object alist)
1611{ 1611{
1612 Lisp_Object tail = list; 1612 Lisp_Object tail = alist;
1613 FOR_EACH_TAIL (tail) 1613 FOR_EACH_TAIL (tail)
1614 if (CONSP (XCAR (tail)) && EQ (XCAR (XCAR (tail)), key)) 1614 if (CONSP (XCAR (tail)) && EQ (XCAR (XCAR (tail)), key))
1615 return XCAR (tail); 1615 return XCAR (tail);
1616 CHECK_LIST_END (tail, list); 1616 CHECK_LIST_END (tail, alist);
1617 return Qnil; 1617 return Qnil;
1618} 1618}
1619 1619
@@ -1621,22 +1621,22 @@ Elements of LIST that are not conses are ignored. */)
1621 Use only on objects known to be non-circular lists. */ 1621 Use only on objects known to be non-circular lists. */
1622 1622
1623Lisp_Object 1623Lisp_Object
1624assq_no_quit (Lisp_Object key, Lisp_Object list) 1624assq_no_quit (Lisp_Object key, Lisp_Object alist)
1625{ 1625{
1626 for (; ! NILP (list); list = XCDR (list)) 1626 for (; ! NILP (alist); alist = XCDR (alist))
1627 if (CONSP (XCAR (list)) && EQ (XCAR (XCAR (list)), key)) 1627 if (CONSP (XCAR (alist)) && EQ (XCAR (XCAR (alist)), key))
1628 return XCAR (list); 1628 return XCAR (alist);
1629 return Qnil; 1629 return Qnil;
1630} 1630}
1631 1631
1632DEFUN ("assoc", Fassoc, Sassoc, 2, 3, 0, 1632DEFUN ("assoc", Fassoc, Sassoc, 2, 3, 0,
1633 doc: /* Return non-nil if KEY is equal to the car of an element of LIST. 1633 doc: /* Return non-nil if KEY is equal to the car of an element of ALIST.
1634The value is actually the first element of LIST whose car equals KEY. 1634The value is actually the first element of ALIST whose car equals KEY.
1635 1635
1636Equality is defined by TESTFN if non-nil or by `equal' if nil. */) 1636Equality is defined by TESTFN if non-nil or by `equal' if nil. */)
1637 (Lisp_Object key, Lisp_Object list, Lisp_Object testfn) 1637 (Lisp_Object key, Lisp_Object alist, Lisp_Object testfn)
1638{ 1638{
1639 Lisp_Object tail = list; 1639 Lisp_Object tail = alist;
1640 FOR_EACH_TAIL (tail) 1640 FOR_EACH_TAIL (tail)
1641 { 1641 {
1642 Lisp_Object car = XCAR (tail); 1642 Lisp_Object car = XCAR (tail);
@@ -1647,7 +1647,7 @@ Equality is defined by TESTFN if non-nil or by `equal' if nil. */)
1647 : !NILP (call2 (testfn, XCAR (car), key)))) 1647 : !NILP (call2 (testfn, XCAR (car), key))))
1648 return car; 1648 return car;
1649 } 1649 }
1650 CHECK_LIST_END (tail, list); 1650 CHECK_LIST_END (tail, alist);
1651 return Qnil; 1651 return Qnil;
1652} 1652}
1653 1653
@@ -1656,11 +1656,11 @@ Equality is defined by TESTFN if non-nil or by `equal' if nil. */)
1656 that are not too deep and are not window configurations. */ 1656 that are not too deep and are not window configurations. */
1657 1657
1658Lisp_Object 1658Lisp_Object
1659assoc_no_quit (Lisp_Object key, Lisp_Object list) 1659assoc_no_quit (Lisp_Object key, Lisp_Object alist)
1660{ 1660{
1661 for (; ! NILP (list); list = XCDR (list)) 1661 for (; ! NILP (alist); alist = XCDR (alist))
1662 { 1662 {
1663 Lisp_Object car = XCAR (list); 1663 Lisp_Object car = XCAR (alist);
1664 if (CONSP (car) 1664 if (CONSP (car)
1665 && (EQ (XCAR (car), key) || equal_no_quit (XCAR (car), key))) 1665 && (EQ (XCAR (car), key) || equal_no_quit (XCAR (car), key)))
1666 return car; 1666 return car;
@@ -1669,24 +1669,24 @@ assoc_no_quit (Lisp_Object key, Lisp_Object list)
1669} 1669}
1670 1670
1671DEFUN ("rassq", Frassq, Srassq, 2, 2, 0, 1671DEFUN ("rassq", Frassq, Srassq, 2, 2, 0,
1672 doc: /* Return non-nil if KEY is `eq' to the cdr of an element of LIST. 1672 doc: /* Return non-nil if KEY is `eq' to the cdr of an element of ALIST.
1673The value is actually the first element of LIST whose cdr is KEY. */) 1673The value is actually the first element of ALIST whose cdr is KEY. */)
1674 (Lisp_Object key, Lisp_Object list) 1674 (Lisp_Object key, Lisp_Object alist)
1675{ 1675{
1676 Lisp_Object tail = list; 1676 Lisp_Object tail = alist;
1677 FOR_EACH_TAIL (tail) 1677 FOR_EACH_TAIL (tail)
1678 if (CONSP (XCAR (tail)) && EQ (XCDR (XCAR (tail)), key)) 1678 if (CONSP (XCAR (tail)) && EQ (XCDR (XCAR (tail)), key))
1679 return XCAR (tail); 1679 return XCAR (tail);
1680 CHECK_LIST_END (tail, list); 1680 CHECK_LIST_END (tail, alist);
1681 return Qnil; 1681 return Qnil;
1682} 1682}
1683 1683
1684DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0, 1684DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0,
1685 doc: /* Return non-nil if KEY is `equal' to the cdr of an element of LIST. 1685 doc: /* Return non-nil if KEY is `equal' to the cdr of an element of ALIST.
1686The value is actually the first element of LIST whose cdr equals KEY. */) 1686The value is actually the first element of ALIST whose cdr equals KEY. */)
1687 (Lisp_Object key, Lisp_Object list) 1687 (Lisp_Object key, Lisp_Object alist)
1688{ 1688{
1689 Lisp_Object tail = list; 1689 Lisp_Object tail = alist;
1690 FOR_EACH_TAIL (tail) 1690 FOR_EACH_TAIL (tail)
1691 { 1691 {
1692 Lisp_Object car = XCAR (tail); 1692 Lisp_Object car = XCAR (tail);
@@ -1694,7 +1694,7 @@ The value is actually the first element of LIST whose cdr equals KEY. */)
1694 && (EQ (XCDR (car), key) || !NILP (Fequal (XCDR (car), key)))) 1694 && (EQ (XCDR (car), key) || !NILP (Fequal (XCDR (car), key))))
1695 return car; 1695 return car;
1696 } 1696 }
1697 CHECK_LIST_END (tail, list); 1697 CHECK_LIST_END (tail, alist);
1698 return Qnil; 1698 return Qnil;
1699} 1699}
1700 1700