changeset 16475:2602c284eb11

(read_minibuf_unwind): Don't restore minibuf_window; instead call choose_minibuf_frame. (choose_minibuf_frame): Don't let any other frame keep its minibuf window selected.
author Richard M. Stallman <rms@gnu.org>
date Sat, 26 Oct 1996 18:16:50 +0000
parents 1b3c7561d286
children 0bf8dab67f91
files src/minibuf.c
diffstat 1 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Sat Oct 26 18:16:11 1996 +0000
+++ b/src/minibuf.c	Sat Oct 26 18:16:50 1996 +0000
@@ -125,6 +125,17 @@
 			  XWINDOW (minibuf_window)->buffer);
       minibuf_window = selected_frame->minibuffer_window;
     }
+
+  /* Make sure no other frame has a minibuffer as its selected window,
+     because the text would not be displayed in it, and that would be
+     confusing.  */
+  {
+    Lisp_Object tail, frame;
+
+    FOR_EACH_FRAME (tail, frame)
+      if (MINI_WINDOW_P (XWINDOW (FRAME_SELECTED_WINDOW (XFRAME (frame)))))
+	Fset_frame_selected_window (frame, Fframe_first_window (frame));
+  }
 }
 
 DEFUN ("set-minibuffer-window", Fset_minibuffer_window,
@@ -489,7 +500,11 @@
   minibuf_save_list = Fcdr (minibuf_save_list);
   Voverriding_local_map = Fcar (minibuf_save_list);
   minibuf_save_list = Fcdr (minibuf_save_list);
-  minibuf_window = Fcar (minibuf_save_list);
+#if 0
+  temp = Fcar (minibuf_save_list);
+  if (FRAME_LIVE_P (XFRAME (WINDOW_FRAME (XWINDOW (temp)))))
+    minibuf_window = temp;
+#endif
   minibuf_save_list = Fcdr (minibuf_save_list);
 
   /* Erase the minibuffer we were using at this level.  */
@@ -503,6 +518,10 @@
     unbind_to (count, Qnil);
   }
 
+  /* Make the minibuffer follow the selected frame
+     (in case we are exiting a recursive minibuffer).  */
+  choose_minibuf_frame ();
+
   /* Make sure minibuffer window is erased, not ignored.  */
   windows_or_buffers_changed++;
   XSETFASTINT (XWINDOW (window)->last_modified, 0);