aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-01-30 13:35:25 +0000
committerDave Love2000-01-30 13:35:25 +0000
commit2995b042b0aa2b8a320d731b6dceaf731ef8e7c3 (patch)
tree856acb0e535d84a87700859daba37f0af7ca7bd4
parentcc4dfff0ece738491b2f9910c9ccb27718261fae (diff)
downloademacs-2995b042b0aa2b8a320d731b6dceaf731ef8e7c3.tar.gz
emacs-2995b042b0aa2b8a320d731b6dceaf731ef8e7c3.zip
Replace dotimes, dolist, with comment.
-rw-r--r--man/cl.texi28
1 files changed, 24 insertions, 4 deletions
diff --git a/man/cl.texi b/man/cl.texi
index 873526a6235..17c92d970df 100644
--- a/man/cl.texi
+++ b/man/cl.texi
@@ -970,7 +970,7 @@ constructs.
970* Variable Bindings:: `progv', `lexical-let', `flet', `macrolet' 970* Variable Bindings:: `progv', `lexical-let', `flet', `macrolet'
971* Conditionals:: `case', `typecase' 971* Conditionals:: `case', `typecase'
972* Blocks and Exits:: `block', `return', `return-from' 972* Blocks and Exits:: `block', `return', `return-from'
973* Iteration:: `do', `do-symbols' 973* Iteration:: `do', `dotimes', `dolist', `do-symbols'
974* Loop Facility:: The Common Lisp `loop' macro 974* Loop Facility:: The Common Lisp `loop' macro
975* Multiple Values:: `values', `multiple-value-bind', etc. 975* Multiple Values:: `values', `multiple-value-bind', etc.
976@end menu 976@end menu
@@ -1924,7 +1924,7 @@ mylist
1924 1924
1925@noindent 1925@noindent
1926In this example, the @code{my-dolist} macro is similar to @code{dolist} 1926In this example, the @code{my-dolist} macro is similar to @code{dolist}
1927except that the variable @code{x} becomes a true 1927(@pxref{Iteration}) except that the variable @code{x} becomes a true
1928reference onto the elements of the list. The @code{my-dolist} call 1928reference onto the elements of the list. The @code{my-dolist} call
1929shown here expands to 1929shown here expands to
1930 1930
@@ -2058,7 +2058,7 @@ Lisp, but this package provides @code{defun*} and @code{defmacro*}
2058forms which do create the implicit block. 2058forms which do create the implicit block.
2059 2059
2060The Common Lisp looping constructs defined by this package, 2060The Common Lisp looping constructs defined by this package,
2061such as @code{loop}, also create implicit blocks 2061such as @code{loop} and @code{dolist}, also create implicit blocks
2062just as in Common Lisp. 2062just as in Common Lisp.
2063 2063
2064Because they are implemented in terms of Emacs Lisp @code{catch} 2064Because they are implemented in terms of Emacs Lisp @code{catch}
@@ -2081,7 +2081,7 @@ Otherwise, @code{nil} is returned.
2081 2081
2082@defspec return [result] 2082@defspec return [result]
2083This macro is exactly like @code{(return-from nil @var{result})}. 2083This macro is exactly like @code{(return-from nil @var{result})}.
2084Common Lisp loops like @code{do} implicitly enclose 2084Common Lisp loops like @code{do} and @code{dolist} implicitly enclose
2085themselves in @code{nil} blocks. 2085themselves in @code{nil} blocks.
2086@end defspec 2086@end defspec
2087 2087
@@ -2191,6 +2191,26 @@ Here is another way to write the above loop:
2191@end example 2191@end example
2192@end defspec 2192@end defspec
2193 2193
2194@defspec dolist (var list [result]) forms@dots{}
2195This is a more specialized loop which iterates across the elements
2196of a list. @var{list} should evaluate to a list; the body @var{forms}
2197are executed with @var{var} bound to each element of the list in
2198turn. Finally, the @var{result} form (or @code{nil}) is evaluated
2199with @var{var} bound to @code{nil} to produce the result returned by
2200the loop. Unlike with Emacs's built in @code{dolist}, the loop is
2201surrounded by an implicit @code{nil} block.
2202@end defspec
2203
2204@defspec dotimes (var count [result]) forms@dots{}
2205This is a more specialized loop which iterates a specified number
2206of times. The body is executed with @var{var} bound to the integers
2207from zero (inclusive) to @var{count} (exclusive), in turn. Then
2208the @code{result} form is evaluated with @var{var} bound to the total
2209number of iterations that were done (i.e., @code{(max 0 @var{count})})
2210to get the return value for the loop form. Unlike with Emacs's built in
2211@code{dolist}, the loop is surrounded by an implicit @code{nil} block.
2212@end defspec
2213
2194@defspec do-symbols (var [obarray [result]]) forms@dots{} 2214@defspec do-symbols (var [obarray [result]]) forms@dots{}
2195This loop iterates over all interned symbols. If @var{obarray} 2215This loop iterates over all interned symbols. If @var{obarray}
2196is specified and is not @code{nil}, it loops over all symbols in 2216is specified and is not @code{nil}, it loops over all symbols in