aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2020-05-02 13:48:21 -0700
committerPaul Eggert2020-05-02 13:49:32 -0700
commit0a3731feef351f6af47bed1458aefb6cb481b5f9 (patch)
treec2ecd98f1c2e6ac4a8e26028af7a69c4a77c8d72
parented25282b82732a7370a4a55633c5830fd473a9b7 (diff)
downloademacs-0a3731feef351f6af47bed1458aefb6cb481b5f9.tar.gz
emacs-0a3731feef351f6af47bed1458aefb6cb481b5f9.zip
Make memq etc. examples more like they were
Problem reported by Štěpán Němec in: https://lists.gnu.org/r/emacs-devel/2020-05/msg00130.html * doc/lispref/lists.texi (Sets And Lists, Association Lists): Revert examples to be more like the way they were, using self-evaluating expressions. Be more consistent about listing unspecified results.
-rw-r--r--doc/lispref/lists.texi18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index ea44e01f48a..fcaf4386b15 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1242,8 +1242,8 @@ compare @var{object} against the elements of the list. For example:
1242 @result{} (b c b a) 1242 @result{} (b c b a)
1243@end group 1243@end group
1244@group 1244@group
1245(memq '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are not @code{eq}.} 1245(memq '(2) '((1) (2))) ; @r{The two @code{(2)}s need not be @code{eq}.}
1246 @result{} nil 1246 @result{} @r{Unspecified; might be @code{nil} or @code{((2))}.}
1247@end group 1247@end group
1248@end example 1248@end example
1249@end defun 1249@end defun
@@ -1356,12 +1356,12 @@ Compare this with @code{memq}:
1356 1356
1357@example 1357@example
1358@group 1358@group
1359(memql 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} must be @code{eql}.} 1359(memql 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} are @code{eql}.}
1360 @result{} (1.2 1.3) 1360 @result{} (1.2 1.3)
1361@end group 1361@end group
1362@group 1362@group
1363(memq 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} need not be @code{eq}.} 1363(memq 1.2 '(1.1 1.2 1.3)) ; @r{The two @code{1.2}s need not be @code{eq}.}
1364 @result{} nil ; @r{... or it might be @code{(1.2 1.3)}.} 1364 @result{} @r{Unspecified; might be @code{nil} or @code{(1.2 1.3)}.}
1365@end group 1365@end group
1366@end example 1366@end example
1367@end defun 1367@end defun
@@ -1380,12 +1380,12 @@ Compare this with @code{memq}:
1380 1380
1381@example 1381@example
1382@group 1382@group
1383(member (list 2) '((1) (2))) ; @r{@code{(list 2)} and @code{(2)} are @code{equal}.} 1383(member '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are @code{equal}.}
1384 @result{} ((2)) 1384 @result{} ((2))
1385@end group 1385@end group
1386@group 1386@group
1387(memq (list 2) '((1) (2))) ; @r{@code{(list 2)} and @code{(2)} are not @code{eq}.} 1387(memq '(2) '((1) (2))) ; @r{The two @code{(2)}s need not be @code{eq}.}
1388 @result{} nil 1388 @result{} @r{Unspecified; might be @code{nil} or @code{(2)}.}
1389@end group 1389@end group
1390@group 1390@group
1391;; @r{Two strings with the same contents are @code{equal}.} 1391;; @r{Two strings with the same contents are @code{equal}.}
@@ -1626,7 +1626,7 @@ keys may not be symbols:
1626 ("compound leaves" . horsechestnut))) 1626 ("compound leaves" . horsechestnut)))
1627 1627
1628(assq "simple leaves" leaves) 1628(assq "simple leaves" leaves)
1629 @result{} @r{Unspecified; might be @code{nil} or non-@code{nil}.} 1629 @result{} @r{Unspecified; might be @code{nil} or @code{("simple leaves" . oak)}.}
1630(assoc "simple leaves" leaves) 1630(assoc "simple leaves" leaves)
1631 @result{} ("simple leaves" . oak) 1631 @result{} ("simple leaves" . oak)
1632@end smallexample 1632@end smallexample