Function: select-window

Select WINDOW which must be a live window.
Also make WINDOW's frame the selected frame and WINDOW that frame's
selected window. In addition, make WINDOW's buffer current and set that
buffer's value of `point' to the value of WINDOW's `window-point'.
Return WINDOW.

Optional second arg NORECORD non-nil means do not put this buffer at the
front of the buffer list and do not make this window the most recently
selected one.

Note that the main editor command loop sets the current buffer to the
buffer of the selected window before each command. (fn WINDOW &optional NORECORD)