Next: save-current-buffer, Previous: current-buffer, Up: Current Buffer [Index]
Make buffer BUFFER-OR-NAME current for editing operations.
may be a buffer or the name of an existing buffer.
When an editing command returns to the editor command loop, Emacs automatically
calls set-buffer
on the buffer shown in the selected window. you should not
use set-buffer to switch visibly to a different buffer; for that, use the
functions described in Switching Buffers. However, when writing a Lisp
function, do not rely on this behavior of the command loop to restore the
current buffer after an operation.
To operate temporarily on another buffer, put the set-buffer
within a
save-current-buffer
form.