# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1211882322 -7200
# Node ID a03acd5fccc4fda1b97d30fc6eaf11b1c4c077b0
# Parent c661944aa2597457798ce30bdaa6ac6ddbc8c3b0
Say explicitly that eq is useful for chars; xref number comparison, lispref
2008-05-27 Aidan Kehoe <kehoea(a)parhasard.net>
* lispref/objects.texi (Equality Predicates):
Cross reference to the section on comparison of numbers when
talking about using #'eq with integers; also mention that
#'eq gives t when passed identical integers, and that #'char= is
also available there.
diff -r c661944aa259 -r a03acd5fccc4 man/ChangeLog
--- a/man/ChangeLog Sun May 25 22:54:33 2008 +0200
+++ b/man/ChangeLog Tue May 27 11:58:42 2008 +0200
@@ -1,3 +1,11 @@ 2008-05-21 Aidan Kehoe <kehoea@parhasa
+2008-05-27 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lispref/objects.texi (Equality Predicates):
+ Cross reference to the section on comparison of numbers when
+ talking about using #'eq with integers; also mention that
+ #'eq gives t when passed identical integers, and that #'char= is
+ also available there.
+
2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
* internals/internals.texi (Ben's README):
diff -r c661944aa259 -r a03acd5fccc4 man/lispref/objects.texi
--- a/man/lispref/objects.texi Sun May 25 22:54:33 2008 +0200
+++ b/man/lispref/objects.texi Tue May 27 11:58:42 2008 +0200
@@ -2246,12 +2246,17 @@ change in one will be reflected by the s
change in one will be reflected by the same change in the other.
@code{eq} returns @code{t} if @var{object1} and @var{object2} are
-integers with the same value. Also, since symbol names are normally
-unique, if the arguments are symbols with the same name, they are
-@code{eq}. For other types (e.g., lists, vectors, strings), two
-arguments with the same contents or elements are not necessarily
-@code{eq} to each other: they are @code{eq} only if they are the same
-object.
+integers with the same value. It is preferable to use @code{=} or
+@code{eql} in many contexts for numeric comparison; @pxref{Comparison of
+Numbers}. @code{eq} also returns @code{t} if @var{object1} and
+@var{object2} are identical characters, though in this case you may
+prefer to use @code{char=}.
+
+Also, since symbol names are normally unique, if the arguments are
+symbols with the same name, they are @code{eq}. For other types (e.g.,
+lists, vectors, strings), two arguments with the same contents or
+elements are not necessarily @code{eq} to each other: they are @code{eq}
+only if they are the same object.
(The @code{make-symbol} function returns an uninterned symbol that is
not interned in the standard @code{obarray}. When uninterned symbols
@@ -2259,11 +2264,11 @@ the same name are not @code{eq}. @xref{
the same name are not @code{eq}. @xref{Creating Symbols}.)
NOTE: Under XEmacs 19, characters are really just integers, and thus
-characters and integers are @code{eq}. Under XEmacs 20, it was
-necessary to preserve remnants of this in function such as @code{old-eq}
-in order to maintain byte-code compatibility. Byte code compiled
-under any Emacs 19 will automatically have calls to @code{eq} mapped
-to @code{old-eq} when executed under XEmacs 20.
+characters and integers with the same numeric are @code{eq}. Under
+XEmacs 20, it was necessary to preserve remnants of this in function
+such as @code{old-eq} in order to maintain byte-code compatibility.
+Byte code compiled under any Emacs 19 will automatically have calls to
+@code{eq} mapped to @code{old-eq} when executed under XEmacs 20.
@example
@group
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches