From 7c6993e21d9e3069c7736cd44c8fa30cded035fc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 4 Nov 2025 13:55:27 +0200 Subject: [PATCH] ; * doc/lispref/objects.texi (Equality Predicates): Restore @group. --- doc/lispref/objects.texi | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 2cde1d99acb..aa8bca84dab 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -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