[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lispref/control.texi
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lispref/control.texi |
Date: |
Mon, 14 Feb 2005 05:07:43 -0500 |
Index: emacs/lispref/control.texi
diff -c emacs/lispref/control.texi:1.21 emacs/lispref/control.texi:1.22
*** emacs/lispref/control.texi:1.21 Wed Jun 23 16:21:43 2004
--- emacs/lispref/control.texi Mon Feb 14 10:07:43 2005
***************
*** 346,353 ****
Note that @code{(car foo)} is not executed if @code{(consp foo)} returns
@code{nil}, thus avoiding an error.
! @code{and} can be expressed in terms of either @code{if} or @code{cond}.
! For example:
@example
@group
--- 346,353 ----
Note that @code{(car foo)} is not executed if @code{(consp foo)} returns
@code{nil}, thus avoiding an error.
! @code{and} expressions can also be written using either @code{if} or
! @code{cond}. Here's how:
@example
@group
***************
*** 476,486 ****
@defmac dolist (var list [result]) address@hidden
@tindex dolist
! This construct executes @var{body} once for each element of @var{list},
! using the variable @var{var} to hold the current element. Then it
! returns the value of evaluating @var{result}, or @code{nil} if
! @var{result} is omitted. For example, here is how you could use
! @code{dolist} to define the @code{reverse} function:
@example
(defun reverse (list)
--- 476,486 ----
@defmac dolist (var list [result]) address@hidden
@tindex dolist
! This construct executes @var{body} once for each element of
! @var{list}, binding the variable @var{var} locally to hold the current
! element. Then it returns the value of evaluating @var{result}, or
! @code{nil} if @var{result} is omitted. For example, here is how you
! could use @code{dolist} to define the @code{reverse} function:
@example
(defun reverse (list)
***************
*** 493,500 ****
@defmac dotimes (var count [result]) address@hidden
@tindex dotimes
This construct executes @var{body} once for each integer from 0
! (inclusive) to @var{count} (exclusive), using the variable @var{var} to
! hold the integer for the current iteration. Then it returns the value
of evaluating @var{result}, or @code{nil} if @var{result} is omitted.
Here is an example of using @code{dotimes} to do something 100 times:
--- 493,500 ----
@defmac dotimes (var count [result]) address@hidden
@tindex dotimes
This construct executes @var{body} once for each integer from 0
! (inclusive) to @var{count} (exclusive), binding the variable @var{var}
! to the integer for the current iteration. Then it returns the value
of evaluating @var{result}, or @code{nil} if @var{result} is omitted.
Here is an example of using @code{dotimes} to do something 100 times:
***************
*** 1167,1173 ****
The @code{unwind-protect} construct is essential whenever you
temporarily put a data structure in an inconsistent state; it permits
! you to make the data consistent again in the event of an error or throw.
@defspec unwind-protect body-form address@hidden
@cindex cleanup forms
--- 1167,1176 ----
The @code{unwind-protect} construct is essential whenever you
temporarily put a data structure in an inconsistent state; it permits
! you to make the data consistent again in the event of an error or
! throw. (Another more specific cleanup construct that is used only for
! changes in buffer contents is the atomic change group; @ref{Atomic
! Changes}.)
@defspec unwind-protect body-form address@hidden
@cindex cleanup forms
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lispref/control.texi,
Richard M . Stallman <=