From: Karl Heuer Date: Sat, 4 Nov 1995 00:21:08 +0000 (+0000) Subject: (choose_minibuf_frame): Moved here from frame.c. X-Git-Tag: emacs-19.34~2463 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89fdc4a0ab4733157083e29e61e80c3890cfec3c;p=emacs.git (choose_minibuf_frame): Moved here from frame.c. --- diff --git a/src/minibuf.c b/src/minibuf.c index fa20bbca9c9..fc8e2ef5061 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -102,6 +102,27 @@ extern Lisp_Object Vminibuf_scroll_window; extern Lisp_Object Voverriding_local_map; +/* Put minibuf on currently selected frame's minibuffer. + We do this whenever the user starts a new minibuffer + or when a minibuffer exits. */ + +void +choose_minibuf_frame () +{ + if (selected_frame != 0 + && !EQ (minibuf_window, selected_frame->minibuffer_window)) + { + /* I don't think that any frames may validly have a null minibuffer + window anymore. */ + if (NILP (selected_frame->minibuffer_window)) + abort (); + + Fset_window_buffer (selected_frame->minibuffer_window, + XWINDOW (minibuf_window)->buffer); + minibuf_window = selected_frame->minibuffer_window; + } +} + /* Actual minibuffer invocation. */ void read_minibuf_unwind ();