aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-06-10 04:08:49 +0000
committerRichard M. Stallman1998-06-10 04:08:49 +0000
commit55607887e1a1a509d8030f04f1b6b9699fa469f6 (patch)
treebbe500f5741fcb9e13fbe185ca3c7d6e2c4e6906
parenteb542c5159b062a10c1b663302d5a886875ad37e (diff)
downloademacs-55607887e1a1a509d8030f04f1b6b9699fa469f6.tar.gz
emacs-55607887e1a1a509d8030f04f1b6b9699fa469f6.zip
*** empty log message ***
-rw-r--r--lispref/eval.texi16
-rw-r--r--lispref/loading.texi6
2 files changed, 15 insertions, 7 deletions
diff --git a/lispref/eval.texi b/lispref/eval.texi
index d49aba1cc16..80c07bf48a6 100644
--- a/lispref/eval.texi
+++ b/lispref/eval.texi
@@ -625,18 +625,22 @@ The number of currently active calls to @code{eval} is limited to
625@code{max-lisp-eval-depth} (see below). 625@code{max-lisp-eval-depth} (see below).
626@end defun 626@end defun
627 627
628@deffn Command eval-region start end &optional stream 628@deffn Command eval-region start end &optional stream read-function
629This function evaluates the forms in the current buffer in the region 629This function evaluates the forms in the current buffer in the region
630defined by the positions @var{start} and @var{end}. It reads forms from 630defined by the positions @var{start} and @var{end}. It reads forms from
631the region and calls @code{eval} on them until the end of the region is 631the region and calls @code{eval} on them until the end of the region is
632reached, or until an error is signaled and not handled. 632reached, or until an error is signaled and not handled.
633 633
634If @var{stream} is supplied, @code{standard-output} is bound to it 634If @var{stream} is non-@code{nil}, the values that result from
635during the evaluation. 635evaluating the expressions in the region are printed using @var{stream}.
636@xref{Output Streams}.
636 637
637You can use the variable @code{load-read-function} to specify a function 638If @var{read-function} is non-@code{nil}, it should be a function, which
638for @code{eval-region} to use instead of @code{read} for reading 639is used instead of @code{read} to read expressions one by one. This
639expressions. @xref{How Programs Do Loading}. 640function is called with one argument, the stream for reading input. You
641can also use the variable @code{load-read-function} (@pxref{How Programs
642Do Loading}) to specify this function, but it is more robust to use the
643@var{read-function} argument.
640 644
641@code{eval-region} always returns @code{nil}. 645@code{eval-region} always returns @code{nil}.
642@end deffn 646@end deffn
diff --git a/lispref/loading.texi b/lispref/loading.texi
index a6efd6ebca2..fb2e3014b85 100644
--- a/lispref/loading.texi
+++ b/lispref/loading.texi
@@ -146,6 +146,10 @@ The function should accept one argument, just as @code{read} does.
146 146
147Normally, the variable's value is @code{nil}, which means those 147Normally, the variable's value is @code{nil}, which means those
148functions should use @code{read}. 148functions should use @code{read}.
149
150@strong{Note:} Instead of using this variable, it is cleaner to use
151another, newer feature: to pass the function as the @var{read-function}
152argument to @code{eval-region}. @xref{Eval}.
149@end defvar 153@end defvar
150 154
151 For information about how @code{load} is used in building Emacs, see 155 For information about how @code{load} is used in building Emacs, see
@@ -720,7 +724,7 @@ The value of @code{load-history} may have one element whose @sc{car} is
720 724
721 The command @code{eval-region} updates @code{load-history}, but does so 725 The command @code{eval-region} updates @code{load-history}, but does so
722by adding the symbols defined to the element for the file being visited, 726by adding the symbols defined to the element for the file being visited,
723rather than replacing that element. 727rather than replacing that element. @xref{Eval}.
724 728
725@node Hooks for Loading 729@node Hooks for Loading
726@section Hooks for Loading 730@section Hooks for Loading