]> code.delx.au - gnu-emacs/commitdiff
(Feql): New function.
authorJohn Paul Wallington <jpw@pobox.com>
Mon, 19 Apr 2004 15:17:53 +0000 (15:17 +0000)
committerJohn Paul Wallington <jpw@pobox.com>
Mon, 19 Apr 2004 15:17:53 +0000 (15:17 +0000)
(syms_of_fns): defsubr it.

src/ChangeLog
src/fns.c

index babc20c57c5b75f86c527e33fc1023a314fedc99..f8d2ee0200cab6b510462fbf6f92748b5a494c8f 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-19  John Paul Wallington  <jpw@gnu.org>
+
+       * fns.c (Feql): New function.
+       (syms_of_fns): defsubr it.
+
 2004-04-18  Jason Rumney  <jasonr@gnu.org>
 
        * w32select.c (Fw32_set_clipboard_data): Get sequence number
index adb262ee11d119b58446284ca684a57de3b98fb0..3076a000992ca45f2d97bf247d5740cb71a2667d 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -2135,6 +2135,18 @@ The PLIST is modified by side effects.  */)
   return plist;
 }
 \f
+DEFUN ("eql", Feql, Seql, 2, 2, 0,
+       doc: /* Return t if the two args are the same Lisp object.
+Floating-point numbers of equal value are `eql', but they may not be `eq'.  */)
+  (obj1, obj2)
+     Lisp_Object obj1, obj2;
+{
+  if (FLOATP (obj1))
+    return internal_equal (obj1, obj2, 0, 0) ? Qt : Qnil;
+  else
+    return EQ (obj1, obj2) ? Qt : Qnil;
+}
+
 DEFUN ("equal", Fequal, Sequal, 2, 2, 0,
        doc: /* Return t if two Lisp objects have similar structure and contents.
 They must have the same data type.
@@ -5740,6 +5752,7 @@ used if both `use-dialog-box' and this variable are non-nil.  */);
   defsubr (&Sput);
   defsubr (&Slax_plist_get);
   defsubr (&Slax_plist_put);
+  defsubr (&Seql);
   defsubr (&Sequal);
   defsubr (&Sequal_including_properties);
   defsubr (&Sfillarray);