More accurate documentation of 'equal' in ELisp Reference

* doc/lispref/objects.texi (Equality Predicates): Add lists and
conses.  (Bug#72888)
This commit is contained in:
Eli Zaretskii 2024-08-30 13:57:29 +03:00
parent 5fbbc3d0cd
commit dfcfaa0ef5

View file

@ -2413,6 +2413,11 @@ 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.
Comparison of strings is case-sensitive, but does not take account of
text properties---it compares only the characters in the strings.
@xref{Text Properties}. Use @code{equal-including-properties} to also
@ -2428,10 +2433,6 @@ same sequence of character codes and all these codes are in the range
@end group
@end example
The @code{equal} function recursively compares the contents of objects
if they are integers, strings, markers, vectors, bool-vectors,
byte-code function objects, char-tables, records, or font objects.
If @var{object1} or @var{object2} contains symbols with position,
@code{equal} treats them as if they were their bare symbols when
@code{symbols-with-pos-enabled} is non-@code{nil}. Otherwise