aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/eval.texi
diff options
context:
space:
mode:
authorJoakim Verona2012-01-23 15:10:06 +0100
committerJoakim Verona2012-01-23 15:10:06 +0100
commit0322b140eead7c94de7f0f6d19a90bd15690b4eb (patch)
tree950c011783cc896d0450084cb5155e54548bfe5b /doc/lispref/eval.texi
parentd5114bfea3ea4c37c57e2af0f3b095be9fcd8bac (diff)
parentcb5850f27c1b4d26957d58e2da2314dd12498671 (diff)
downloademacs-0322b140eead7c94de7f0f6d19a90bd15690b4eb.tar.gz
emacs-0322b140eead7c94de7f0f6d19a90bd15690b4eb.zip
upstream
Diffstat (limited to 'doc/lispref/eval.texi')
-rw-r--r--doc/lispref/eval.texi24
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index adb4841a82d..fc18e503543 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -64,8 +64,8 @@ evaluate a @dfn{function call} form such as @code{(car x)}, Emacs
64first evaluates the argument (the subform @code{x}). After evaluating 64first evaluates the argument (the subform @code{x}). After evaluating
65the argument, Emacs @dfn{executes} the function (@code{car}), and if 65the argument, Emacs @dfn{executes} the function (@code{car}), and if
66the function is written in Lisp, execution works by evaluating the 66the function is written in Lisp, execution works by evaluating the
67@dfn{body} of the function. (In this example, however, @code{car} is 67@dfn{body} of the function (in this example, however, @code{car} is
68not a Lisp function; it is a primitive function implemented in C.) 68not a Lisp function; it is a primitive function implemented in C).
69@xref{Functions}, for more information about functions and function 69@xref{Functions}, for more information about functions and function
70calls. 70calls.
71 71
@@ -77,9 +77,8 @@ variables (@pxref{Variables}).@footnote{This definition of
77that can affect the result of a program.} Whenever a form refers to a 77that can affect the result of a program.} Whenever a form refers to a
78variable without creating a new binding for it, the variable evaluates 78variable without creating a new binding for it, the variable evaluates
79to the value given by the current environment. Evaluating a form may 79to the value given by the current environment. Evaluating a form may
80create a new environment for recursive evaluation, by binding 80also temporarily alter the environment by binding variables
81variables (@pxref{Local Variables}). Such environments are temporary, 81(@pxref{Local Variables}).
82and vanish when the evaluation of the form is complete.
83 82
84@cindex side effect 83@cindex side effect
85 Evaluating a form may also make changes that persist; these changes 84 Evaluating a form may also make changes that persist; these changes
@@ -177,9 +176,9 @@ program. Here is an example:
177@cindex symbol evaluation 176@cindex symbol evaluation
178 177
179 When a symbol is evaluated, it is treated as a variable. The result 178 When a symbol is evaluated, it is treated as a variable. The result
180is the variable's value, if it has one. If it has none (if its value 179is the variable's value, if it has one. If the symbol has no value as
181cell is void), an error is signaled. For more information on the use of 180a variable, the Lisp interpreter signals an error. For more
182variables, see @ref{Variables}. 181information on the use of variables, see @ref{Variables}.
183 182
184 In the following example, we set the value of a symbol with 183 In the following example, we set the value of a symbol with
185@code{setq}. Then we evaluate the symbol, and get back the value that 184@code{setq}. Then we evaluate the symbol, and get back the value that
@@ -602,12 +601,13 @@ functions provides the ability to pass information to them as
602arguments. 601arguments.
603 602
604@defun eval form &optional lexical 603@defun eval form &optional lexical
605This is the basic function evaluating an expression. It evaluates 604This is the basic function for evaluating an expression. It evaluates
606@var{form} in the current environment and returns the result. How the 605@var{form} in the current environment and returns the result. How the
607evaluation proceeds depends on the type of the object (@pxref{Forms}). 606evaluation proceeds depends on the type of the object (@pxref{Forms}).
608@var{lexical} if non-nil means to evaluate @var{form} using lexical scoping 607
609rules (@pxref{Lexical Binding}) instead of the default dynamic scoping used 608The argument @var{lexical}, if non-@code{nil}, means to evaluate
610historically in Emacs Lisp. 609@var{form} using lexical scoping rules for variables, instead of the
610default dynamic scoping rules. @xref{Lexical Binding}.
611 611
612Since @code{eval} is a function, the argument expression that appears 612Since @code{eval} is a function, the argument expression that appears
613in a call to @code{eval} is evaluated twice: once as preparation before 613in a call to @code{eval} is evaluated twice: once as preparation before