Commit a7f284ec authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(with-current-buffer): New macro.

parent 2754fefa
......@@ -740,6 +740,13 @@ Wildcards and redirection are handled as usual in the shell."
(start-process name buffer shell-file-name shell-command-switch
(mapconcat 'identity args " ")))))
(defmacro with-current-buffer (buffer &rest body)
"Execute the forms in BODY with BUFFER as the current buffer.
The value returned is the value of the last form in BODY."
(set-buffer ,buffer)
. ,body))
(defvar save-match-data-internal)
;; We use save-match-data-internal as the local variable because
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