Function: window-combined-p

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

Signature

(window-combined-p &optional WINDOW HORIZONTAL)

Documentation

Return non-nil if WINDOW has siblings in a given direction.

WINDOW must be a valid window and defaults to the selected one.

HORIZONTAL determines a direction for the window combination. If HORIZONTAL is omitted or nil, return non-nil if WINDOW is part of a vertical window combination. If HORIZONTAL is non-nil, return non-nil if WINDOW is part of a horizontal window combination.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window-combined-p (&optional window horizontal)
  "Return non-nil if WINDOW has siblings in a given direction.
WINDOW must be a valid window and defaults to the selected one.

HORIZONTAL determines a direction for the window combination.  If
HORIZONTAL is omitted or nil, return non-nil if WINDOW is part of
a vertical window combination.  If HORIZONTAL is non-nil, return
non-nil if WINDOW is part of a horizontal window combination."
  (setq window (window-normalize-window window))
  (let ((parent (window-parent window)))
    (and parent
	 (if horizontal
	     (window-left-child parent)
	   (window-top-child parent)))))