changeset 99124:a96e658622b6

(with-current-buffer): Rename buffer argument to buffer-or-name.
author Martin Rudalics <rudalics@gmx.at>
date Sat, 25 Oct 2008 09:17:44 +0000
parents b86c228e54c9
children 47b36b351e0f
files lisp/subr.el
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Sat Oct 25 08:08:19 2008 +0000
+++ b/lisp/subr.el	Sat Oct 25 09:17:44 2008 +0000
@@ -2483,14 +2483,14 @@
 
 ;;;; Lisp macros to do various things temporarily.
 
-(defmacro with-current-buffer (buffer &rest body)
-  "Execute the forms in BODY with BUFFER temporarily current.
-BUFFER can be a buffer or a buffer name.
-The value returned is the value of the last form in BODY.
-See also `with-temp-buffer'."
+(defmacro with-current-buffer (buffer-or-name &rest body)
+  "Execute the forms in BODY with BUFFER-OR-NAME temporarily current.
+BUFFER-OR-NAME must be a buffer or the name of an existing buffer.
+The value returned is the value of the last form in BODY.  See
+also `with-temp-buffer'."
   (declare (indent 1) (debug t))
   `(save-current-buffer
-     (set-buffer ,buffer)
+     (set-buffer ,buffer-or-name)
      ,@body))
 
 (defmacro with-selected-window (window &rest body)