From: Martin Rudalics Date: Sat, 25 Oct 2008 09:18:19 +0000 (+0000) Subject: (with-current-buffer): Rename buffer argument to buffer-or-name. X-Git-Tag: emacs-pretest-23.0.90~2191 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=83f57f499af3922fd09956044f7fe8596e21b686;p=emacs.git (with-current-buffer): Rename buffer argument to buffer-or-name. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 56d04af23e7..b6651bd3ac0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2008-10-25 Martin Rudalics + * subr.el (with-current-buffer): Rename buffer argument to + buffer-or-name. * window.el (get-buffer-window-list): Rename buffer argument to buffer-or-name and make it optional. diff --git a/lisp/subr.el b/lisp/subr.el index 5a1f4d42ee2..0dda4b0e604 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2483,14 +2483,14 @@ Similar to `call-process-shell-command', but calls `process-file'." ;;;; 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)