1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-06 05:52:32 -08:00

(Fdisplay_buffer): If we give up and try other frames,

look again for a window in those frames already showing BUFFER.
This commit is contained in:
Richard M. Stallman 1997-05-03 06:12:28 +00:00
parent bcabbf77d3
commit 48d9379dfe

View file

@ -2219,13 +2219,20 @@ buffer names are handled.")
&& window_height (window) >= window_min_height << 1)
window = Fsplit_window (window, Qnil, Qnil);
/* If Fget_lru_window returned nil, try other approaches. */
/* Try visible frames first. */
if (NILP (window))
window = Fget_buffer_window (buffer, Qvisible);
if (NILP (window))
window = Fget_largest_window (Qvisible);
/* If that didn't work, try iconified frames. */
if (NILP (window))
window = Fget_buffer_window (buffer, make_number (0));
if (NILP (window))
window = Fget_largest_window (make_number (0));
/* Try invisible frames. */
if (NILP (window))
window = Fget_buffer_window (buffer, Qt);
if (NILP (window))
window = Fget_largest_window (Qt);
/* As a last resort, make a new frame. */