aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fns.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/fns.c b/src/fns.c
index c17c62020a6..56b3f693d6e 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -569,7 +569,7 @@ assq_no_quit (key, list)
569 569
570DEFUN ("assoc", Fassoc, Sassoc, 2, 2, 0, 570DEFUN ("assoc", Fassoc, Sassoc, 2, 2, 0,
571 "Return non-nil if KEY is `equal' to the car of an element of LIST.\n\ 571 "Return non-nil if KEY is `equal' to the car of an element of LIST.\n\
572The value is actually the element of LIST whose car is KEY.") 572The value is actually the element of LIST whose car equals KEY.")
573 (key, list) 573 (key, list)
574 register Lisp_Object key; 574 register Lisp_Object key;
575 Lisp_Object list; 575 Lisp_Object list;
@@ -606,6 +606,26 @@ The value is actually the element of LIST whose cdr is ELT.")
606 } 606 }
607 return Qnil; 607 return Qnil;
608} 608}
609
610DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0,
611 "Return non-nil if KEY is `equal' to the cdr of an element of LIST.\n\
612The value is actually the element of LIST whose cdr equals KEY.")
613 (key, list)
614 register Lisp_Object key;
615 Lisp_Object list;
616{
617 register Lisp_Object tail;
618 for (tail = list; !NILP (tail); tail = Fcdr (tail))
619 {
620 register Lisp_Object elt, tem;
621 elt = Fcar (tail);
622 if (!CONSP (elt)) continue;
623 tem = Fequal (Fcdr (elt), key);
624 if (!NILP (tem)) return elt;
625 QUIT;
626 }
627 return Qnil;
628}
609 629
610DEFUN ("delq", Fdelq, Sdelq, 2, 2, 0, 630DEFUN ("delq", Fdelq, Sdelq, 2, 2, 0,
611 "Delete by side effect any occurrences of ELT as a member of LIST.\n\ 631 "Delete by side effect any occurrences of ELT as a member of LIST.\n\
@@ -1464,6 +1484,7 @@ Used by `featurep' and `require', and altered by `provide'.");
1464 defsubr (&Sassq); 1484 defsubr (&Sassq);
1465 defsubr (&Sassoc); 1485 defsubr (&Sassoc);
1466 defsubr (&Srassq); 1486 defsubr (&Srassq);
1487 defsubr (&Srassoc);
1467 defsubr (&Sdelq); 1488 defsubr (&Sdelq);
1468 defsubr (&Sdelete); 1489 defsubr (&Sdelete);
1469 defsubr (&Snreverse); 1490 defsubr (&Snreverse);