Function: select-window
select-window is a byte-compiled function defined in window.c.
Signature
(select-window WINDOW &optional NORECORD)
Documentation
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 its
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. Also, do not mark WINDOW for redisplay unless NORECORD
equals the special symbol mark-for-redisplay.
Run buffer-list-update-hook unless NORECORD is non-nil. Note that
applications and internal routines often select a window temporarily for
various purposes; mostly, to simplify coding. As a rule, such
selections should not be recorded and therefore will not pollute
buffer-list-update-hook. Selections that "really count" are those
causing a visible change in the next redisplay of WINDOW's frame and
should always be recorded. So if you think of running a function each
time a window gets selected, put it on buffer-list-update-hook or
window-selection-change-functions.
Also note that the main editor command loop sets the current buffer to the buffer of the selected window before each command.
This function has :after advice: evil--sw-refresh-cursor.
Probably introduced at or before Emacs version 22.1.
Source Code
// Defined in /usr/src/emacs/src/window.c
{
return select_window (window, norecord, false);
}