changeset 22419:3967db186db6

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Wed, 10 Jun 1998 04:08:49 +0000
parents 340060628c47
children cb77a5a6a629
files lispref/eval.texi lispref/loading.texi
diffstat 2 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/eval.texi	Wed Jun 10 03:58:47 1998 +0000
+++ b/lispref/eval.texi	Wed Jun 10 04:08:49 1998 +0000
@@ -625,18 +625,22 @@
 @code{max-lisp-eval-depth} (see below).
 @end defun
 
-@deffn Command eval-region start end &optional stream
+@deffn Command eval-region start end &optional stream read-function
 This function evaluates the forms in the current buffer in the region
 defined by the positions @var{start} and @var{end}.  It reads forms from
 the region and calls @code{eval} on them until the end of the region is
 reached, or until an error is signaled and not handled.
 
-If @var{stream} is supplied, @code{standard-output} is bound to it
-during the evaluation.
+If @var{stream} is non-@code{nil}, the values that result from
+evaluating the expressions in the region are printed using @var{stream}.
+@xref{Output Streams}.
 
-You can use the variable @code{load-read-function} to specify a function
-for @code{eval-region} to use instead of @code{read} for reading
-expressions.  @xref{How Programs Do Loading}.
+If @var{read-function} is non-@code{nil}, it should be a function, which
+is used instead of @code{read} to read expressions one by one.  This
+function is called with one argument, the stream for reading input.  You
+can also use the variable @code{load-read-function} (@pxref{How Programs
+Do Loading}) to specify this function, but it is more robust to use the
+@var{read-function} argument.
 
 @code{eval-region} always returns @code{nil}.
 @end deffn
--- a/lispref/loading.texi	Wed Jun 10 03:58:47 1998 +0000
+++ b/lispref/loading.texi	Wed Jun 10 04:08:49 1998 +0000
@@ -146,6 +146,10 @@
 
 Normally, the variable's value is @code{nil}, which means those
 functions should use @code{read}.
+
+@strong{Note:} Instead of using this variable, it is cleaner to use
+another, newer feature: to pass the function as the @var{read-function}
+argument to @code{eval-region}.  @xref{Eval}.
 @end defvar
 
   For information about how @code{load} is used in building Emacs, see
@@ -720,7 +724,7 @@
 
   The command @code{eval-region} updates @code{load-history}, but does so
 by adding the symbols defined to the element for the file being visited,
-rather than replacing that element.
+rather than replacing that element.  @xref{Eval}.
 
 @node Hooks for Loading
 @section Hooks for Loading