-DEFUN ("get-lru-window", Fget_lru_window, Sget_lru_window, 0, 2, 0,
- doc: /* Return the window least recently selected or used for display.
-\(LRU means Least Recently Used.)
-
-Return a full-width window if possible.
-A minibuffer window is never a candidate.
-A dedicated window is never a candidate, unless DEDICATED is non-nil,
- so if all windows are dedicated, the value is nil.
-If optional argument FRAME is `visible', search all visible frames.
-If FRAME is 0, search all visible and iconified frames.
-If FRAME is t, search all frames.
-If FRAME is nil, search only the selected frame.
-If FRAME is a frame, search only that frame. */)
- (Lisp_Object frame, Lisp_Object dedicated)
-{
- register Lisp_Object w;
- /* First try for a window that is full-width */
- w = window_loop (GET_LRU_WINDOW,
- NILP (dedicated) ? make_number (1) : make_number (3),
- 0, frame);
- if (!NILP (w) && !EQ (w, selected_window))
- return w;
- /* If none of them, try the rest */
- return window_loop (GET_LRU_WINDOW,
- NILP (dedicated) ? make_number (0) : make_number (2),
- 0, frame);
-}
-
-DEFUN ("get-largest-window", Fget_largest_window, Sget_largest_window, 0, 2, 0,
- doc: /* Return the largest window in area.
-A minibuffer window is never a candidate.
-A dedicated window is never a candidate unless DEDICATED is non-nil,
- so if all windows are dedicated, the value is nil.
-If optional argument FRAME is `visible', search all visible frames.
-If FRAME is 0, search all visible and iconified frames.
-If FRAME is t, search all frames.
-If FRAME is nil, search only the selected frame.
-If FRAME is a frame, search only that frame. */)
- (Lisp_Object frame, Lisp_Object dedicated)
-{
- return window_loop (GET_LARGEST_WINDOW, dedicated, 0,
- frame);
-}
-