Commit 09460d9a authored by Martin Rudalics's avatar Martin Rudalics

(Current Buffer): Reword set-buffer and

with-current-buffer documentations.
(Creating Buffers): Reword documentation of get-buffer-create.
parent 83f57f49
2008-10-25 Martin Rudalics <rudalics@gmx.at>
* buffers.texi (Current Buffer): Reword set-buffer and
with-current-buffer documentations.
(Creating Buffers): Reword documentation of get-buffer-create.
2008-10-23 Martin Rudalics <rudalics@gmx.at> 2008-10-23 Martin Rudalics <rudalics@gmx.at>
* buffers.texi (Current Buffer): Reword documentation of * buffers.texi (Current Buffer): Reword documentation of
......
...@@ -194,10 +194,9 @@ This function returns the current buffer. ...@@ -194,10 +194,9 @@ This function returns the current buffer.
@end defun @end defun
@defun set-buffer buffer-or-name @defun set-buffer buffer-or-name
This function makes @var{buffer-or-name} the current buffer. An error This function makes @var{buffer-or-name} the current buffer.
is signaled if @var{buffer-or-name} is not an existing buffer or the @var{buffer-or-name} must be an existing buffer or the name of an
name of an existing buffer. The return value is the buffer made existing buffer. The return value is the buffer made current.
current.
This function does not display the buffer in any window, so the user This function does not display the buffer in any window, so the user
cannot necessarily see the buffer. But Lisp programs will now operate cannot necessarily see the buffer. But Lisp programs will now operate
...@@ -220,13 +219,12 @@ remains current. ...@@ -220,13 +219,12 @@ remains current.
@defmac with-current-buffer buffer-or-name body@dots{} @defmac with-current-buffer buffer-or-name body@dots{}
The @code{with-current-buffer} macro saves the identity of the current The @code{with-current-buffer} macro saves the identity of the current
buffer, makes @var{buffer-or-name} current, evaluates the @var{body} buffer, makes @var{buffer-or-name} current, evaluates the @var{body}
forms, and finally restores the buffer. The return value is the value forms, and finally restores the current buffer. @var{buffer-or-name}
of the last form in @var{body}. The current buffer is restored even must specify an existing buffer or the name of an existing buffer.
in case of an abnormal exit via @code{throw} or error (@pxref{Nonlocal
Exits}).
An error is signaled if @var{buffer-or-name} does not identify an The return value is the value of the last form in @var{body}. The
existing buffer. current buffer is restored even in case of an abnormal exit via
@code{throw} or error (@pxref{Nonlocal Exits}).
@end defmac @end defmac
@defmac with-temp-buffer body@dots{} @defmac with-temp-buffer body@dots{}
...@@ -911,15 +909,15 @@ buffer and gives it a unique name. ...@@ -911,15 +909,15 @@ buffer and gives it a unique name.
subprocess can also create a buffer (@pxref{Processes}). subprocess can also create a buffer (@pxref{Processes}).
@defun get-buffer-create buffer-or-name @defun get-buffer-create buffer-or-name
This function returns a buffer named @var{buffer-or-name}. An error is This function returns a buffer named @var{buffer-or-name}. The buffer
signaled if @var{buffer-or-name} is neither a string nor a buffer. The returned does not become the current buffer---this function does not
buffer returned does not become the current buffer---this function does change which buffer is current.
not change which buffer is current.
@var{buffer-or-name} must be either a string or an existing buffer. If
If @var{buffer-or-name} is a string and a live buffer with that name it is a string and a live buffer with that name already exists,
exists, it returns that buffer. If no such buffer exists, it creates a @code{get-buffer-create} returns that buffer. If no such buffer exists,
new buffer. If @var{buffer-or-name} is a buffer instead of a string, it it creates a new buffer. If @var{buffer-or-name} is a buffer instead of
is returned as given, even if it is dead. a string, it is returned as given, even if it is dead.
@example @example
@group @group
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment