From: Karl Heuer Date: Tue, 30 May 1995 06:53:08 +0000 (+0000) Subject: (make_frame_without_minibuffer): New arg DISPLAY. X-Git-Tag: emacs-19.34~3848 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b06602395f523eee027a2fd7f0b8e1b70b86dfd4;p=emacs.git (make_frame_without_minibuffer): New arg DISPLAY. If there's no minibuffer frame to use, create one. --- diff --git a/src/frame.c b/src/frame.c index ab4713b2d66..3591ef4f20b 100644 --- a/src/frame.c +++ b/src/frame.c @@ -256,34 +256,37 @@ make_frame (mini_p) default (the global minibuffer). */ struct frame * -make_frame_without_minibuffer (mini_window, kb) +make_frame_without_minibuffer (mini_window, kb, display) register Lisp_Object mini_window; KBOARD *kb; + Lisp_Object display; { register struct frame *f; - /* Choose the minibuffer window to use. */ - if (NILP (mini_window)) - { - if (!FRAMEP (kb->Vdefault_minibuffer_frame)) - error ("default-minibuffer-frame must be set when creating minibufferless frames"); - if (! FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))) - error ("default-minibuffer-frame must be a live frame"); - mini_window = XFRAME (kb->Vdefault_minibuffer_frame)->minibuffer_window; - } - else - { - CHECK_LIVE_WINDOW (mini_window, 0); - } + if (!NILP (mini_window)) + CHECK_LIVE_WINDOW (mini_window, 0); #ifdef MULTI_KBOARD - if (XFRAME (XWINDOW (mini_window)->frame)->kboard != kb) + if (!NILP (mini_window) + && XFRAME (XWINDOW (mini_window)->frame)->kboard != kb) error ("frame and minibuffer must be on the same display"); #endif /* Make a frame containing just a root window. */ f = make_frame (0); + if (NILP (mini_window)) + { + /* Use default-minibuffer-frame if possible. */ + if (!FRAMEP (kb->Vdefault_minibuffer_frame) + || ! FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))) + { + /* If there's no minibuffer frame to use, create one. */ + kb->Vdefault_minibuffer_frame + = call1 (intern ("make-initial-minibuffer-frame"), display); + } + mini_window = XFRAME (kb->Vdefault_minibuffer_frame)->minibuffer_window; + } /* Install the chosen minibuffer window, with proper buffer. */ f->minibuffer_window = mini_window; Fset_window_buffer (mini_window,