Mercurial > emacs
comparison src/frame.c @ 12010:57eb365d32f0
(make_frame_without_minibuffer): New arg DISPLAY.
If there's no minibuffer frame to use, create one.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 30 May 1995 06:53:08 +0000 |
parents | 3e9db7cb1d05 |
children | 7286ed64badd |
comparison
equal
deleted
inserted
replaced
12009:29adc0df831d | 12010:57eb365d32f0 |
---|---|
254 /* Make a frame using a separate minibuffer window on another frame. | 254 /* Make a frame using a separate minibuffer window on another frame. |
255 MINI_WINDOW is the minibuffer window to use. nil means use the | 255 MINI_WINDOW is the minibuffer window to use. nil means use the |
256 default (the global minibuffer). */ | 256 default (the global minibuffer). */ |
257 | 257 |
258 struct frame * | 258 struct frame * |
259 make_frame_without_minibuffer (mini_window, kb) | 259 make_frame_without_minibuffer (mini_window, kb, display) |
260 register Lisp_Object mini_window; | 260 register Lisp_Object mini_window; |
261 KBOARD *kb; | 261 KBOARD *kb; |
262 Lisp_Object display; | |
262 { | 263 { |
263 register struct frame *f; | 264 register struct frame *f; |
264 | 265 |
265 /* Choose the minibuffer window to use. */ | 266 if (!NILP (mini_window)) |
266 if (NILP (mini_window)) | 267 CHECK_LIVE_WINDOW (mini_window, 0); |
267 { | |
268 if (!FRAMEP (kb->Vdefault_minibuffer_frame)) | |
269 error ("default-minibuffer-frame must be set when creating minibufferless frames"); | |
270 if (! FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))) | |
271 error ("default-minibuffer-frame must be a live frame"); | |
272 mini_window = XFRAME (kb->Vdefault_minibuffer_frame)->minibuffer_window; | |
273 } | |
274 else | |
275 { | |
276 CHECK_LIVE_WINDOW (mini_window, 0); | |
277 } | |
278 | 268 |
279 #ifdef MULTI_KBOARD | 269 #ifdef MULTI_KBOARD |
280 if (XFRAME (XWINDOW (mini_window)->frame)->kboard != kb) | 270 if (!NILP (mini_window) |
271 && XFRAME (XWINDOW (mini_window)->frame)->kboard != kb) | |
281 error ("frame and minibuffer must be on the same display"); | 272 error ("frame and minibuffer must be on the same display"); |
282 #endif | 273 #endif |
283 | 274 |
284 /* Make a frame containing just a root window. */ | 275 /* Make a frame containing just a root window. */ |
285 f = make_frame (0); | 276 f = make_frame (0); |
286 | 277 |
278 if (NILP (mini_window)) | |
279 { | |
280 /* Use default-minibuffer-frame if possible. */ | |
281 if (!FRAMEP (kb->Vdefault_minibuffer_frame) | |
282 || ! FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))) | |
283 { | |
284 /* If there's no minibuffer frame to use, create one. */ | |
285 kb->Vdefault_minibuffer_frame | |
286 = call1 (intern ("make-initial-minibuffer-frame"), display); | |
287 } | |
288 mini_window = XFRAME (kb->Vdefault_minibuffer_frame)->minibuffer_window; | |
289 } | |
287 /* Install the chosen minibuffer window, with proper buffer. */ | 290 /* Install the chosen minibuffer window, with proper buffer. */ |
288 f->minibuffer_window = mini_window; | 291 f->minibuffer_window = mini_window; |
289 Fset_window_buffer (mini_window, | 292 Fset_window_buffer (mini_window, |
290 (NILP (Vminibuffer_list) | 293 (NILP (Vminibuffer_list) |
291 ? get_minibuffer (0) | 294 ? get_minibuffer (0) |