Function: window-right

window-right is a byte-compiled function defined in window.el.gz.

Signature

(window-right WINDOW)

Documentation

Return WINDOW's right sibling.

Return nil if WINDOW is the root window of its frame. WINDOW can be any window.

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
;; The following two functions are like `window-next-sibling' and
;; `window-prev-sibling' but the WINDOW argument is _not_ optional (so
;; they don't substitute the selected window for nil), and they return
;; nil when WINDOW doesn't have a parent (like a frame's root window or
;; a minibuffer window).
(defun window-right (window)
  "Return WINDOW's right sibling.
Return nil if WINDOW is the root window of its frame.  WINDOW can
be any window."
  (and window (window-parent window) (window-next-sibling window)))