mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
; * doc/lispref/objects.texi (Equality Predicates): Restore @group.
This commit is contained in:
parent
11860fe936
commit
7c6993e21d
1 changed files with 14 additions and 1 deletions
|
|
@ -2369,40 +2369,51 @@ regards it as its bare symbol when @code{symbols-with-pos-enabled} is
|
||||||
non-@code{nil} (@pxref{Symbols with Position}).
|
non-@code{nil} (@pxref{Symbols with Position}).
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@group
|
||||||
(eq 'abc 'abc) @result{} t
|
(eq 'abc 'abc) @result{} t
|
||||||
(eq 'abc 'ABC) @result{} nil
|
(eq 'abc 'ABC) @result{} nil
|
||||||
(eq ?A ?A) @result{} t
|
(eq ?A ?A) @result{} t
|
||||||
(eq 3 3) @result{} t
|
(eq 3 3) @result{} t
|
||||||
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Equal non-fixnum numbers may or may not be the same object:
|
Equal non-fixnum numbers may or may not be the same object:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@group
|
||||||
(eq 3.0 3.0) @result{} t @r{or} nil
|
(eq 3.0 3.0) @result{} t @r{or} nil
|
||||||
(eq (expt 10 50) (expt 10 50)) @result{} t @r{or} nil
|
(eq (expt 10 50) (expt 10 50)) @result{} t @r{or} nil
|
||||||
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Newly created mutable objects are distinct:
|
Newly created mutable objects are distinct:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@group
|
||||||
(eq (list 1 2 3) (list 1 2 3)) @result{} nil
|
(eq (list 1 2 3) (list 1 2 3)) @result{} nil
|
||||||
(eq (point-marker) (point-marker)) @result{} nil
|
(eq (point-marker) (point-marker)) @result{} nil
|
||||||
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Equal constants of other types may or may not be the same object:
|
Equal constants of other types may or may not be the same object:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@group
|
||||||
(eq "abc" "abc") @result{} t @r{or} nil
|
(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
|
||||||
(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
|
@end example
|
||||||
|
|
||||||
Unless they are the same literal constant:
|
@noindent
|
||||||
|
unless they are the same literal constant:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@group
|
||||||
(let ((x "abc")) (eq x x)) @result{} t
|
(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
|
||||||
(let ((x [1 2 3])) (eq x x)) @result{} t
|
(let ((x [1 2 3])) (eq x x)) @result{} t
|
||||||
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
|
|
@ -2513,8 +2524,10 @@ returns @code{t} if and only if both the expressions below return
|
||||||
@code{t}:
|
@code{t}:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@group
|
||||||
(equal (car @var{x}) (car @var{y}))
|
(equal (car @var{x}) (car @var{y}))
|
||||||
(equal (cdr @var{x}) (cdr @var{y}))
|
(equal (cdr @var{x}) (cdr @var{y}))
|
||||||
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Comparing circular lists may therefore cause deep recursion that leads
|
Comparing circular lists may therefore cause deep recursion that leads
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue