Commit 83f57f49 authored by Martin Rudalics's avatar Martin Rudalics

(with-current-buffer): Rename buffer argument to buffer-or-name.

parent cf20330b
2008-10-25 Martin Rudalics <rudalics@gmx.at>
* 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.
......
......@@ -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)
......
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