diff options
| author | Eli Zaretskii | 2025-11-04 13:55:27 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2025-11-04 13:55:27 +0200 |
| commit | 7c6993e21d9e3069c7736cd44c8fa30cded035fc (patch) | |
| tree | 3b13856516b67298ac660264dfa641a9f11be570 /doc/lispref/objects.texi | |
| parent | 11860fe936cfbb9dc13ab728e5c9719b7e7721a3 (diff) | |
| download | emacs-7c6993e21d9e3069c7736cd44c8fa30cded035fc.tar.gz emacs-7c6993e21d9e3069c7736cd44c8fa30cded035fc.zip | |
; * doc/lispref/objects.texi (Equality Predicates): Restore @group.
Diffstat (limited to 'doc/lispref/objects.texi')
| -rw-r--r-- | doc/lispref/objects.texi | 15 |
1 files changed, 14 insertions, 1 deletions
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 | |||
| 2369 | non-@code{nil} (@pxref{Symbols with Position}). | 2369 | non-@code{nil} (@pxref{Symbols with Position}). |
| 2370 | 2370 | ||
| 2371 | @example | 2371 | @example |
| 2372 | @group | ||
| 2372 | (eq 'abc 'abc) @result{} t | 2373 | (eq 'abc 'abc) @result{} t |
| 2373 | (eq 'abc 'ABC) @result{} nil | 2374 | (eq 'abc 'ABC) @result{} nil |
| 2374 | (eq ?A ?A) @result{} t | 2375 | (eq ?A ?A) @result{} t |
| 2375 | (eq 3 3) @result{} t | 2376 | (eq 3 3) @result{} t |
| 2377 | @end group | ||
| 2376 | @end example | 2378 | @end example |
| 2377 | 2379 | ||
| 2378 | Equal non-fixnum numbers may or may not be the same object: | 2380 | Equal non-fixnum numbers may or may not be the same object: |
| 2379 | 2381 | ||
| 2380 | @example | 2382 | @example |
| 2383 | @group | ||
| 2381 | (eq 3.0 3.0) @result{} t @r{or} nil | 2384 | (eq 3.0 3.0) @result{} t @r{or} nil |
| 2382 | (eq (expt 10 50) (expt 10 50)) @result{} t @r{or} nil | 2385 | (eq (expt 10 50) (expt 10 50)) @result{} t @r{or} nil |
| 2386 | @end group | ||
| 2383 | @end example | 2387 | @end example |
| 2384 | 2388 | ||
| 2385 | Newly created mutable objects are distinct: | 2389 | Newly created mutable objects are distinct: |
| 2386 | 2390 | ||
| 2387 | @example | 2391 | @example |
| 2392 | @group | ||
| 2388 | (eq (list 1 2 3) (list 1 2 3)) @result{} nil | 2393 | (eq (list 1 2 3) (list 1 2 3)) @result{} nil |
| 2389 | (eq (point-marker) (point-marker)) @result{} nil | 2394 | (eq (point-marker) (point-marker)) @result{} nil |
| 2395 | @end group | ||
| 2390 | @end example | 2396 | @end example |
| 2391 | 2397 | ||
| 2392 | Equal constants of other types may or may not be the same object: | 2398 | Equal constants of other types may or may not be the same object: |
| 2393 | 2399 | ||
| 2394 | @example | 2400 | @example |
| 2401 | @group | ||
| 2395 | (eq "abc" "abc") @result{} t @r{or} nil | 2402 | (eq "abc" "abc") @result{} t @r{or} nil |
| 2396 | (eq '(1 2 3) '(1 2 3)) @result{} t @r{or} nil | 2403 | (eq '(1 2 3) '(1 2 3)) @result{} t @r{or} nil |
| 2397 | (eq [1 2 3] [1 2 3]) @result{} t @r{or} nil | 2404 | (eq [1 2 3] [1 2 3]) @result{} t @r{or} nil |
| 2405 | @end group | ||
| 2398 | @end example | 2406 | @end example |
| 2399 | 2407 | ||
| 2400 | Unless they are the same literal constant: | 2408 | @noindent |
| 2409 | unless they are the same literal constant: | ||
| 2401 | 2410 | ||
| 2402 | @example | 2411 | @example |
| 2412 | @group | ||
| 2403 | (let ((x "abc")) (eq x x)) @result{} t | 2413 | (let ((x "abc")) (eq x x)) @result{} t |
| 2404 | (let ((x '(1 2 3))) (eq x x)) @result{} t | 2414 | (let ((x '(1 2 3))) (eq x x)) @result{} t |
| 2405 | (let ((x [1 2 3])) (eq x x)) @result{} t | 2415 | (let ((x [1 2 3])) (eq x x)) @result{} t |
| 2416 | @end group | ||
| 2406 | @end example | 2417 | @end example |
| 2407 | 2418 | ||
| 2408 | @noindent | 2419 | @noindent |
| @@ -2513,8 +2524,10 @@ returns @code{t} if and only if both the expressions below return | |||
| 2513 | @code{t}: | 2524 | @code{t}: |
| 2514 | 2525 | ||
| 2515 | @example | 2526 | @example |
| 2527 | @group | ||
| 2516 | (equal (car @var{x}) (car @var{y})) | 2528 | (equal (car @var{x}) (car @var{y})) |
| 2517 | (equal (cdr @var{x}) (cdr @var{y})) | 2529 | (equal (cdr @var{x}) (cdr @var{y})) |
| 2530 | @end group | ||
| 2518 | @end example | 2531 | @end example |
| 2519 | 2532 | ||
| 2520 | Comparing circular lists may therefore cause deep recursion that leads | 2533 | Comparing circular lists may therefore cause deep recursion that leads |