From: Richard M. Stallman Date: Sat, 3 May 1997 06:12:28 +0000 (+0000) Subject: (Fdisplay_buffer): If we give up and try other frames, X-Git-Tag: emacs-20.1~2317 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=48d9379dfee53e55b3e273dcca5bc3bcb8a06b15;p=emacs.git (Fdisplay_buffer): If we give up and try other frames, look again for a window in those frames already showing BUFFER. --- diff --git a/src/window.c b/src/window.c index 982a7d1d96d..cf45ea30021 100644 --- a/src/window.c +++ b/src/window.c @@ -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. */