[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/fns.c,v
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/fns.c,v |
Date: |
Wed, 20 Sep 2006 23:07:17 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kim F. Storm <kfstorm> 06/09/20 23:07:17
Index: fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fns.c,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -b -r1.415 -r1.416
--- fns.c 2 Sep 2006 13:39:48 -0000 1.415
+++ fns.c 20 Sep 2006 23:07:17 -0000 1.416
@@ -1464,11 +1464,10 @@
}
DEFUN ("memq", Fmemq, Smemq, 2, 2, 0,
- doc: /* Return non-nil if ELT is an element of LIST.
-Comparison done with `eq'. The value is actually the tail of LIST
-whose car is ELT. */)
+doc: /* Return non-nil if ELT is an element of LIST. Comparison done with
`eq'.
+The value is actually the tail of LIST whose car is ELT. */)
(elt, list)
- Lisp_Object elt, list;
+ register Lisp_Object elt, list;
{
while (1)
{
@@ -1491,6 +1490,30 @@
return list;
}
+DEFUN ("memql", Fmemql, Smemql, 2, 2, 0,
+doc: /* Return non-nil if ELT is an element of LIST. Comparison done with
`eql'.
+The value is actually the tail of LIST whose car is ELT. */)
+ (elt, list)
+ register Lisp_Object elt;
+ Lisp_Object list;
+{
+ register Lisp_Object tail;
+
+ if (!FLOATP (elt))
+ return Fmemq (elt, list);
+
+ for (tail = list; !NILP (tail); tail = XCDR (tail))
+ {
+ register Lisp_Object tem;
+ CHECK_LIST_CONS (tail, list);
+ tem = XCAR (tail);
+ if (FLOATP (tem) && internal_equal (elt, tem, 0, 0))
+ return tail;
+ QUIT;
+ }
+ return Qnil;
+}
+
DEFUN ("assq", Fassq, Sassq, 2, 2, 0,
doc: /* Return non-nil if KEY is `eq' to the car of an element of LIST.
The value is actually the first element of LIST whose car is KEY.
@@ -5833,6 +5856,7 @@
defsubr (&Selt);
defsubr (&Smember);
defsubr (&Smemq);
+ defsubr (&Smemql);
defsubr (&Sassq);
defsubr (&Sassoc);
defsubr (&Srassq);