aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-11-27 12:07:08 +0200
committerEli Zaretskii2015-11-27 12:07:08 +0200
commit3f42061bb631361465a7693035f220760a74133b (patch)
tree28af9170bc8fc91535d9e335643a02c06160651e /src
parent33460000f92fbfd054937aa3555f6cf27567716d (diff)
downloademacs-3f42061bb631361465a7693035f220760a74133b.tar.gz
emacs-3f42061bb631361465a7693035f220760a74133b.zip
Improve documentation of 'eval-buffer' and 'eval-region'
* src/lread.c (Feval_buffer, Feval_region): Doc fixes. (Bug#22023) * doc/lispref/eval.texi (Eval): Mention narrowing to clarify "accessible portion of buffer".
Diffstat (limited to 'src')
-rw-r--r--src/lread.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/lread.c b/src/lread.c
index 2239bfc452a..94f373c3539 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1941,17 +1941,22 @@ readevalloop (Lisp_Object readcharfun,
1941} 1941}
1942 1942
1943DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "", 1943DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "",
1944 doc: /* Execute the current buffer as Lisp code. 1944 doc: /* Execute the accessible portion of current buffer as Lisp code.
1945You can use \\[narrow-to-region] to limit the part of buffer to be evaluated.
1945When called from a Lisp program (i.e., not interactively), this 1946When called from a Lisp program (i.e., not interactively), this
1946function accepts up to five optional arguments: 1947function accepts up to five optional arguments:
1947BUFFER is the buffer to evaluate (nil means use current buffer). 1948BUFFER is the buffer to evaluate (nil means use current buffer),
1948PRINTFLAG controls printing of output: 1949 or a name of a buffer (a string).
1949 A value of nil means discard it; anything else is stream for print. 1950PRINTFLAG controls printing of output by any output functions in the
1951 evaluated code, such as `print', `princ', and `prin1':
1952 a value of nil means discard it; anything else is the stream to print to.
1953 See Info node `(elisp)Output Streams' for details on streams.
1950FILENAME specifies the file name to use for `load-history'. 1954FILENAME specifies the file name to use for `load-history'.
1951UNIBYTE, if non-nil, specifies `load-convert-to-unibyte' for this 1955UNIBYTE, if non-nil, specifies `load-convert-to-unibyte' for this
1952 invocation. 1956 invocation.
1953DO-ALLOW-PRINT, if non-nil, specifies that `print' and related 1957DO-ALLOW-PRINT, if non-nil, specifies that output functions in the
1954 functions should work normally even if PRINTFLAG is nil. 1958 evaluated code should work normally even if PRINTFLAG is nil, in
1959 which case the output is displayed in the echo area.
1955 1960
1956This function preserves the position of point. */) 1961This function preserves the position of point. */)
1957 (Lisp_Object buffer, Lisp_Object printflag, Lisp_Object filename, Lisp_Object unibyte, Lisp_Object do_allow_print) 1962 (Lisp_Object buffer, Lisp_Object printflag, Lisp_Object filename, Lisp_Object unibyte, Lisp_Object do_allow_print)
@@ -1992,7 +1997,8 @@ When called from programs, expects two arguments,
1992giving starting and ending indices in the current buffer 1997giving starting and ending indices in the current buffer
1993of the text to be executed. 1998of the text to be executed.
1994Programs can pass third argument PRINTFLAG which controls output: 1999Programs can pass third argument PRINTFLAG which controls output:
1995A value of nil means discard it; anything else is stream for printing it. 2000 a value of nil means discard it; anything else is stream for printing it.
2001 See Info node `(elisp)Output Streams' for details on streams.
1996Also the fourth argument READ-FUNCTION, if non-nil, is used 2002Also the fourth argument READ-FUNCTION, if non-nil, is used
1997instead of `read' to read each expression. It gets one argument 2003instead of `read' to read each expression. It gets one argument
1998which is the input stream for reading characters. 2004which is the input stream for reading characters.