From 09460d9acce90d265e92f6114b3e12b194d76711 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 25 Oct 2008 09:58:12 +0000 Subject: [PATCH] (Current Buffer): Reword set-buffer and with-current-buffer documentations. (Creating Buffers): Reword documentation of get-buffer-create. --- doc/lispref/ChangeLog | 6 ++++++ doc/lispref/buffers.texi | 36 +++++++++++++++++------------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fb37335d85..29f89ef88c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2008-10-25 Martin Rudalics + + * 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 * buffers.texi (Current Buffer): Reword documentation of diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 5bf27eda42..0b6b30000a 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -194,10 +194,9 @@ This function returns the current buffer. @end defun @defun set-buffer buffer-or-name -This function makes @var{buffer-or-name} the current buffer. An error -is signaled if @var{buffer-or-name} is not an existing buffer or the -name of an existing buffer. The return value is the buffer made -current. +This function makes @var{buffer-or-name} the current buffer. +@var{buffer-or-name} must be an existing buffer or the name of an +existing buffer. The return value is the buffer made current. This function does not display the buffer in any window, so the user cannot necessarily see the buffer. But Lisp programs will now operate @@ -220,13 +219,12 @@ remains current. @defmac with-current-buffer buffer-or-name body@dots{} The @code{with-current-buffer} macro saves the identity of the current buffer, makes @var{buffer-or-name} current, evaluates the @var{body} -forms, and finally restores the buffer. The return value is the value -of the last form in @var{body}. The current buffer is restored even -in case of an abnormal exit via @code{throw} or error (@pxref{Nonlocal -Exits}). +forms, and finally restores the current buffer. @var{buffer-or-name} +must specify an existing buffer or the name of an existing buffer. -An error is signaled if @var{buffer-or-name} does not identify an -existing buffer. +The return value is the value of the last form in @var{body}. The +current buffer is restored even in case of an abnormal exit via +@code{throw} or error (@pxref{Nonlocal Exits}). @end defmac @defmac with-temp-buffer body@dots{} @@ -911,15 +909,15 @@ buffer and gives it a unique name. subprocess can also create a buffer (@pxref{Processes}). @defun get-buffer-create buffer-or-name -This function returns a buffer named @var{buffer-or-name}. An error is -signaled if @var{buffer-or-name} is neither a string nor a buffer. The -buffer returned does not become the current buffer---this function does -not change which buffer is current. - -If @var{buffer-or-name} is a string and a live buffer with that name -exists, it returns that buffer. If no such buffer exists, it creates a -new buffer. If @var{buffer-or-name} is a buffer instead of a string, it -is returned as given, even if it is dead. +This function returns a buffer named @var{buffer-or-name}. The buffer +returned does not become the current buffer---this function does not +change which buffer is current. + +@var{buffer-or-name} must be either a string or an existing buffer. If +it is a string and a live buffer with that name already exists, +@code{get-buffer-create} returns that buffer. If no such buffer exists, +it creates a new buffer. If @var{buffer-or-name} is a buffer instead of +a string, it is returned as given, even if it is dead. @example @group -- 2.20.1