Commit 08908aca authored by Martin Rudalics's avatar Martin Rudalics

Don't call Fset_window_buffer from C code.

* frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
(delete_frame, Fmake_frame_invisible, Ficonify_frame):
* minibuf.c (choose_minibuf_frame, read_minibuf):
* w32fns.c (x_create_tip_frame):
* xfns.c (x_create_tip_frame): Call set_window_buffer instead of
Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
parent e5b19827
2012-08-14 Martin Rudalics <rudalics@gmx.at>
* frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
(delete_frame, Fmake_frame_invisible, Ficonify_frame):
* minibuf.c (choose_minibuf_frame, read_minibuf):
* w32fns.c (x_create_tip_frame):
* xfns.c (x_create_tip_frame): Call set_window_buffer instead of
Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
* intervals.c (offset_intervals): Remove obsolete comment.
......
......@@ -407,10 +407,12 @@ make_frame_without_minibuffer (register Lisp_Object mini_window, KBOARD *kb, Lis
/* Make the chosen minibuffer window display the proper minibuffer,
unless it is already showing a minibuffer. */
if (NILP (Fmemq (XWINDOW (mini_window)->buffer, Vminibuffer_list)))
Fset_window_buffer (mini_window,
(NILP (Vminibuffer_list)
? get_minibuffer (0)
: Fcar (Vminibuffer_list)), Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (mini_window,
(NILP (Vminibuffer_list)
? get_minibuffer (0)
: Fcar (Vminibuffer_list)), 0, 0);
return f;
}
......@@ -445,10 +447,12 @@ make_minibuffer_frame (void)
/* Put the proper buffer in that window. */
Fset_window_buffer (mini_window,
(NILP (Vminibuffer_list)
? get_minibuffer (0)
: Fcar (Vminibuffer_list)), Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (mini_window,
(NILP (Vminibuffer_list)
? get_minibuffer (0)
: Fcar (Vminibuffer_list)), 0, 0);
return f;
}
#endif /* HAVE_WINDOW_SYSTEM */
......@@ -1240,8 +1244,10 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
/* Don't allow minibuf_window to remain on a deleted frame. */
if (EQ (f->minibuffer_window, minibuf_window))
{
Fset_window_buffer (sf->minibuffer_window,
XWINDOW (minibuf_window)->buffer, Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (sf->minibuffer_window,
XWINDOW (minibuf_window)->buffer, 0, 0);
minibuf_window = sf->minibuffer_window;
/* If the dying minibuffer window was selected,
......@@ -1713,8 +1719,10 @@ displayed in the terminal. */)
if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window))
{
struct frame *sf = XFRAME (selected_frame);
Fset_window_buffer (sf->minibuffer_window,
XWINDOW (minibuf_window)->buffer, Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (sf->minibuffer_window,
XWINDOW (minibuf_window)->buffer, 0, 0);
minibuf_window = sf->minibuffer_window;
}
......@@ -1747,12 +1755,14 @@ If omitted, FRAME defaults to the currently selected frame. */)
Fhandle_switch_frame (next_frame (frame, Qt));
#endif
/* Don't allow minibuf_window to remain on a deleted frame. */
/* Don't allow minibuf_window to remain on an iconified frame. */
if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window))
{
struct frame *sf = XFRAME (selected_frame);
Fset_window_buffer (sf->minibuffer_window,
XWINDOW (minibuf_window)->buffer, Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (sf->minibuffer_window,
XWINDOW (minibuf_window)->buffer, 0, 0);
minibuf_window = sf->minibuffer_window;
}
......
......@@ -117,7 +117,9 @@ choose_minibuf_frame (void)
init_window_once. That window doesn't have a buffer. */
buffer = XWINDOW (minibuf_window)->buffer;
if (BUFFERP (buffer))
Fset_window_buffer (sf->minibuffer_window, buffer, Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (sf->minibuffer_window, buffer, 0, 0);
minibuf_window = sf->minibuffer_window;
}
......@@ -617,11 +619,15 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
if (! NILP (mini_window) && ! EQ (mini_window, minibuf_window)
&& !NILP (Fwindow_minibuffer_p (mini_window)))
Fset_window_buffer (mini_window, empty_minibuf, Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (mini_window, empty_minibuf, 0, 0);
}
/* Display this minibuffer in the proper window. */
Fset_window_buffer (minibuf_window, Fcurrent_buffer (), Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (minibuf_window, Fcurrent_buffer (), 0, 0);
Fselect_window (minibuf_window, Qnil);
XWINDOW (minibuf_window)->hscroll = 0;
......
......@@ -5237,7 +5237,9 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
XSETFRAME (frame, f);
buffer = Fget_buffer_create (build_string (" *tip*"));
Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0);
old_buffer = current_buffer;
set_buffer_internal_1 (XBUFFER (buffer));
BSET (current_buffer, truncate_lines, Qnil);
......
......@@ -4591,7 +4591,9 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
XSETFRAME (frame, f);
buffer = Fget_buffer_create (build_string (" *tip*"));
Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil);
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0);
old_buffer = current_buffer;
set_buffer_internal_1 (XBUFFER (buffer));
BSET (current_buffer, truncate_lines, Qnil);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment