From 89fdc4a0ab4733157083e29e61e80c3890cfec3c Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sat, 4 Nov 1995 00:21:08 +0000 Subject: [PATCH] (choose_minibuf_frame): Moved here from frame.c. --- src/minibuf.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 (); -- 2.39.2