comparison src/minibuf.c @ 1317:b74069f669cc

* minibuf.c (read_minibuf): Don't bother to save the current frame's focus, and have read_minibuf_unwind restore it; saving and restoring the window configurations will take care of that. (read_minibuf_unwind): Don't worry about restoring the frame's focus.
author Jim Blandy <jimb@redhat.com>
date Sat, 03 Oct 1992 00:06:36 +0000
parents 7c4519722020
children b359c67a9194
comparison
equal deleted inserted replaced
1316:f09c5c6563b8 1317:b74069f669cc
160 } 160 }
161 161
162 val = current_buffer->directory; 162 val = current_buffer->directory;
163 Fset_buffer (get_minibuffer (minibuf_level)); 163 Fset_buffer (get_minibuffer (minibuf_level));
164 current_buffer->directory = val; 164 current_buffer->directory = val;
165 Fredirect_frame_focus (Fselected_frame (), mini_frame);
165 Fmake_local_variable (Qprint_escape_newlines); 166 Fmake_local_variable (Qprint_escape_newlines);
166 print_escape_newlines = 1; 167 print_escape_newlines = 1;
167 168
168 #ifdef MULTI_FRAME
169 /* If the minibuffer window is on another frame, shift this frame's
170 focus to that window, and arrange to put it back later. */
171 if (XFRAME (WINDOW_FRAME (XWINDOW (minibuf_window)))
172 != selected_frame)
173 {
174 record_unwind_protect (read_minibuf_unwind,
175 Fcons (Fselected_frame (),
176 FRAME_FOCUS_FRAME (selected_frame)));
177
178 Fredirect_frame_focus (Fselected_frame (), mini_frame);
179 }
180 else
181 record_unwind_protect (read_minibuf_unwind, Qnil);
182 #else
183 record_unwind_protect (read_minibuf_unwind, Qnil); 169 record_unwind_protect (read_minibuf_unwind, Qnil);
184 #endif
185 170
186 Vminibuf_scroll_window = selected_window; 171 Vminibuf_scroll_window = selected_window;
187 Fset_window_buffer (minibuf_window, Fcurrent_buffer ()); 172 Fset_window_buffer (minibuf_window, Fcurrent_buffer ());
188 Fselect_window (minibuf_window); 173 Fselect_window (minibuf_window);
189 XFASTINT (XWINDOW (minibuf_window)->hscroll) = 0; 174 XFASTINT (XWINDOW (minibuf_window)->hscroll) = 0;
309 Vcurrent_prefix_arg = minibuf_save_vector[minibuf_level].current_prefix_arg; 294 Vcurrent_prefix_arg = minibuf_save_vector[minibuf_level].current_prefix_arg;
310 Vminibuffer_history_position 295 Vminibuffer_history_position
311 = minibuf_save_vector[minibuf_level].history_position; 296 = minibuf_save_vector[minibuf_level].history_position;
312 Vminibuffer_history_variable 297 Vminibuffer_history_variable
313 = minibuf_save_vector[minibuf_level].history_variable; 298 = minibuf_save_vector[minibuf_level].history_variable;
314
315 #ifdef MULTI_FRAME
316 /* Redirect the focus of the frame that called the minibuffer. */
317 if (CONSP (data))
318 Fredirect_frame_focus (XCONS (data)->car, XCONS (data)->cdr);
319 #endif
320 } 299 }
321 300
322 301
323 /* This comment supplies the doc string for read-from-minibuffer, 302 /* This comment supplies the doc string for read-from-minibuffer,
324 for make-docfile to see. We cannot put this in the real DEFUN 303 for make-docfile to see. We cannot put this in the real DEFUN