emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-30 2ca7d5649c6: ; More accurate text about how `equal` compares va


From: Mattias Engdegård
Subject: emacs-30 2ca7d5649c6: ; More accurate text about how `equal` compares various objects
Date: Sat, 31 Aug 2024 12:44:56 -0400 (EDT)

branch: emacs-30
commit 2ca7d5649c69efbc65a4c7c074c52d8f4f0d4a21
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    ; More accurate text about how `equal` compares various objects
    
    * doc/lispref/objects.texi (Equality Predicates):
    Attempt at improving the text further (bug#72888).
---
 doc/lispref/objects.texi | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 399a1d169c2..34ea7cf4996 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -2413,10 +2413,12 @@ the converse is not always true.
 @end group
 @end example
 
-The @code{equal} function recursively compares the contents of objects
-if they are integers, strings, markers, lists, cons cells, vectors,
-bool-vectors, byte-code function objects, char-tables, records, or font
-objects.
+The @code{equal} function compares strings and bool-vectors by value.
+Numbers are compared by type and numeric value, using @code{eql}.
+Lists, cons cells, vectors, records, markers, char-tables, font objects,
+and function objects (closures)@footnote{However, equality of distinct
+function objects cannot be guaranteed in general.} are compared
+recursively by using @code{equal} on their constituent parts.
 
 Comparison of strings is case-sensitive, but does not take account of
 text properties---it compares only the characters in the strings.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]