Function: windmove-find-other-window

windmove-find-other-window is a byte-compiled function defined in windmove.el.gz.

Signature

(windmove-find-other-window DIR &optional ARG WINDOW)

Documentation

Return the window object in direction DIR as seen from WINDOW.

DIR is one of left, up, right, or down. WINDOW must be a live window and defaults to the selected one. Optional ARG, if negative, means to use the right or bottom edge of WINDOW as reference position, instead of window-point; if positive, use the left or top edge of WINDOW as reference point.

Source Code

;; Defined in /usr/src/emacs/lisp/windmove.el.gz
;; Rewritten on 2013-12-13 using `window-in-direction'.  After the
;; pixelwise change the old approach didn't work any more.  martin
(defun windmove-find-other-window (dir &optional arg window)
  "Return the window object in direction DIR as seen from WINDOW.
DIR is one of `left', `up', `right', or `down'.
WINDOW must be a live window and defaults to the selected one.
Optional ARG, if negative, means to use the right or bottom edge of
WINDOW as reference position, instead of `window-point'; if positive,
use the left or top edge of WINDOW as reference point."
  (window-in-direction dir window windmove-allow-all-windows
                       arg windmove-wrap-around t))