This patch implements the further generalization of an idea suggested by Stefan at http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00088.html. The main motivations are 1) make 'struct window' even bit smaller and 2) simplify the code like: if (!NILP (w->hchild)) foo (w->hchild); else if (!NILP (w->vchild)) foo (w->vchild); else /* assume leaf window with w->buffer */ bar (w->buffer); to: if (WINDOWP (w->object)) foo (w->object); else /* assume leaf window with buffer at w->object */ bar (w->object); As usual, reviews and comments are highly appreciated, especially for the 'struct window' member which replaces hchild/vchild/buffer (I don't like too generic 'object', but couldn't think up the better name). Dmitry