window-state-get

window-state-get is a compiled Lisp function in `window.el'.

(window-state-get &optional WINDOW WRITABLE)

Return state of WINDOW as a Lisp object.
WINDOW can be any window and defaults to the root window of the
selected frame.

Optional argument WRITABLE non-nil means do not use markers for
sampling `window-point' and `window-start'. Together, WRITABLE
and the variable `window-persistent-parameters' specify which
window parameters are saved by this function. WRITABLE should be
non-nil when the return value shall be written to a file and read
back in another session. Otherwise, an application may run into
an `invalid-read-syntax' error while attempting to read back the
value from file.

The return value can be used as argument for `window-state-put'
to put the state recorded here into an arbitrary window. The
value can be also stored on disk and read back in a new session.