Function: compare-windows-get-next-window
compare-windows-get-next-window is a byte-compiled function defined in
compare-w.el.gz.
Signature
(compare-windows-get-next-window)
Documentation
Return the window next in the cyclic ordering of windows.
In the selected frame contains only one window, consider windows on all visible frames.
Probably introduced at or before Emacs version 25.1.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/compare-w.el.gz
(defun compare-windows-get-next-window ()
"Return the window next in the cyclic ordering of windows.
In the selected frame contains only one window, consider windows
on all visible frames."
(let ((w2 (next-window)))
(if (eq w2 (selected-window))
(setq w2 (next-window (selected-window) nil 'visible)))
(if (eq w2 (selected-window))
(error "No other window"))
w2))