Lisp_Object window, windows, best_window, frame_arg;
bool frame_best_window_flag = false;
struct frame *f;
- struct gcpro gcpro1;
/* If we're only looping through windows on a particular frame,
frame points to that frame. If we're looping through windows
window = FRAME_SELECTED_WINDOW (SELECTED_FRAME ());
windows = window_list_1 (window, mini ? Qt : Qnil, frame_arg);
- GCPRO1 (windows);
best_window = Qnil;
for (; CONSP (windows); windows = XCDR (windows))
{
if (EQ (window, selected_window))
/* Preferably return the selected window. */
- RETURN_UNGCPRO (window);
+ return window;
else if (EQ (XWINDOW (window)->frame, selected_frame)
&& !frame_best_window_flag)
/* Prefer windows on the current frame (but don't
}
}
- UNGCPRO;
return best_window;
}