1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

; * doc/lispref/objects.texi (Equality Predicates): Restore @group.

This commit is contained in:
Eli Zaretskii 2025-11-04 13:55:27 +02:00
parent 11860fe936
commit 7c6993e21d

View file

@ -2369,40 +2369,51 @@ regards it as its bare symbol when @code{symbols-with-pos-enabled} is
non-@code{nil} (@pxref{Symbols with Position}).
@example
@group
(eq 'abc 'abc) @result{} t
(eq 'abc 'ABC) @result{} nil
(eq ?A ?A) @result{} t
(eq 3 3) @result{} t
@end group
@end example
Equal non-fixnum numbers may or may not be the same object:
@example
@group
(eq 3.0 3.0) @result{} t @r{or} nil
(eq (expt 10 50) (expt 10 50)) @result{} t @r{or} nil
@end group
@end example
Newly created mutable objects are distinct:
@example
@group
(eq (list 1 2 3) (list 1 2 3)) @result{} nil
(eq (point-marker) (point-marker)) @result{} nil
@end group
@end example
Equal constants of other types may or may not be the same object:
@example
@group
(eq "abc" "abc") @result{} t @r{or} nil
(eq '(1 2 3) '(1 2 3)) @result{} t @r{or} nil
(eq [1 2 3] [1 2 3]) @result{} t @r{or} nil
@end group
@end example
Unless they are the same literal constant:
@noindent
unless they are the same literal constant:
@example
@group
(let ((x "abc")) (eq x x)) @result{} t
(let ((x '(1 2 3))) (eq x x)) @result{} t
(let ((x [1 2 3])) (eq x x)) @result{} t
@end group
@end example
@noindent
@ -2513,8 +2524,10 @@ returns @code{t} if and only if both the expressions below return
@code{t}:
@example
@group
(equal (car @var{x}) (car @var{y}))
(equal (cdr @var{x}) (cdr @var{y}))
@end group
@end example
Comparing circular lists may therefore cause deep recursion that leads