comparison lisp/subr.el @ 349:8429d81ab209 r21-1-4

Import from CVS: tag r21-1-4
author cvs
date Mon, 13 Aug 2007 10:54:28 +0200
parents 70ad99077275
children 7347b34c275b
comparison
equal deleted inserted replaced
348:0843b9714b95 349:8429d81ab209
331 (prog1 331 (prog1
332 (buffer-string) 332 (buffer-string)
333 (erase-buffer)))) 333 (erase-buffer))))
334 334
335 (defmacro with-current-buffer (buffer &rest body) 335 (defmacro with-current-buffer (buffer &rest body)
336 "Execute the forms in BODY with BUFFER as the current buffer. 336 "Temporarily make BUFFER the current buffer and execute the forms in BODY.
337 The value returned is the value of the last form in BODY. 337 The value returned is the value of the last form in BODY.
338 See also `with-temp-buffer'." 338 See also `with-temp-buffer'."
339 `(save-current-buffer 339 `(save-current-buffer
340 (set-buffer ,buffer) 340 (set-buffer ,buffer)
341 ,@body)) 341 ,@body))