# HG changeset patch # User Richard M. Stallman # Date 774389965 0 # Node ID 8f227ebb7748af2fdc84ba81e79244f29fc6c9e9 # Parent bae811318a57df89dbcd51ccbcbea49c7502dc40 [!MULTI_FRAME] (Fframe_first_window): Defined. (syms_of_frame): Defvar it. diff -r bae811318a57 -r 8f227ebb7748 src/frame.c --- a/src/frame.c Sat Jul 16 20:18:53 1994 +0000 +++ b/src/frame.c Sat Jul 16 20:19:25 1994 +0000 @@ -1837,6 +1837,28 @@ XFASTINT (tem) = 0; return tem; } + +DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, + 0) + (frame) + Lisp_Object frame; +{ + Lisp_Object w; + + w = FRAME_ROOT_WINDOW (selected_frame); + + while (NILP (XWINDOW (w)->buffer)) + { + if (! NILP (XWINDOW (w)->hchild)) + w = XWINDOW (w)->hchild; + else if (! NILP (XWINDOW (w)->vchild)) + w = XWINDOW (w)->vchild; + else + abort (); + } + return w; +} + DEFUN ("framep", Fframep, Sframep, 1, 1, 0, /* Don't confuse make-docfile by having two doc strings for this function. make-docfile does not pay attention to #if, for good reason! */ @@ -2078,6 +2100,7 @@ XFASTINT (Vterminal_frame) = 0; defsubr (&Sselected_frame); + defsubr (&Sframe_first_window); defsubr (&Sframep); defsubr (&Sframe_char_height); defsubr (&Sframe_char_width);