Function: window-normalize-window
window-normalize-window is a byte-compiled function defined in
window.el.gz.
Signature
(window-normalize-window WINDOW &optional LIVE-ONLY)
Documentation
Return window specified by WINDOW.
If WINDOW is nil, return the selected window. Otherwise, if WINDOW is a live or an internal window, return WINDOW; if LIVE-ONLY is non-nil, return WINDOW for a live window only. Otherwise, signal an error.
This function is commonly used to process the (usually optional)
"WINDOW" argument of window related functions where nil stands
for the selected window.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window-normalize-window (window &optional live-only)
"Return window specified by WINDOW.
If WINDOW is nil, return the selected window. Otherwise, if
WINDOW is a live or an internal window, return WINDOW; if
LIVE-ONLY is non-nil, return WINDOW for a live window only.
Otherwise, signal an error.
This function is commonly used to process the (usually optional)
\"WINDOW\" argument of window related functions where nil stands
for the selected window."
(cond
((null window)
(selected-window))
(live-only
(if (window-live-p window)
window
(error "%s is not a live window" window)))
((window-valid-p window)
window)
(t
(error "%s is not a valid window" window))))