4938 |
Lisp_Object new_current_buffer; |
Lisp_Object new_current_buffer; |
4939 |
Lisp_Object frame; |
Lisp_Object frame; |
4940 |
FRAME_PTR f; |
FRAME_PTR f; |
|
int old_point = -1; |
|
4941 |
|
|
4942 |
while (!WINDOW_CONFIGURATIONP (configuration)) |
while (!WINDOW_CONFIGURATIONP (configuration)) |
4943 |
wrong_type_argument (Qwindow_configuration_p, configuration); |
wrong_type_argument (Qwindow_configuration_p, configuration); |
4948 |
new_current_buffer = data->current_buffer; |
new_current_buffer = data->current_buffer; |
4949 |
if (NILP (XBUFFER (new_current_buffer)->name)) |
if (NILP (XBUFFER (new_current_buffer)->name)) |
4950 |
new_current_buffer = Qnil; |
new_current_buffer = Qnil; |
|
else |
|
|
{ |
|
|
if (XBUFFER (new_current_buffer) == current_buffer) |
|
|
old_point = PT; |
|
|
} |
|
4951 |
|
|
4952 |
frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; |
frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; |
4953 |
f = XFRAME (frame); |
f = XFRAME (frame); |
5099 |
p->mark, w->buffer); |
p->mark, w->buffer); |
5100 |
|
|
5101 |
/* As documented in Fcurrent_window_configuration, don't |
/* As documented in Fcurrent_window_configuration, don't |
5102 |
save the location of point in the buffer which was current |
restore the location of point in the buffer which was |
5103 |
when the window configuration was recorded. */ |
current when the window configuration was recorded. */ |
5104 |
if (!EQ (p->buffer, new_current_buffer) |
if (!EQ (p->buffer, new_current_buffer) |
5105 |
&& XBUFFER (p->buffer) == current_buffer) |
&& XBUFFER (p->buffer) == current_buffer) |
5106 |
Fgoto_char (w->pointm); |
Fgoto_char (w->pointm); |
5138 |
That swapping out has already been done, |
That swapping out has already been done, |
5139 |
near the beginning of this function. */ |
near the beginning of this function. */ |
5140 |
selected_window = Qnil; |
selected_window = Qnil; |
5141 |
|
if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) |
5142 |
|
set_marker_restricted (XWINDOW (data->current_window)->pointm, |
5143 |
|
make_number (BUF_PT (XBUFFER (XWINDOW (data->current_window)->buffer))), |
5144 |
|
XWINDOW (data->current_window)->buffer); |
5145 |
|
|
5146 |
Fselect_window (data->current_window); |
Fselect_window (data->current_window); |
5147 |
XBUFFER (XWINDOW (selected_window)->buffer)->last_selected_window |
XBUFFER (XWINDOW (selected_window)->buffer)->last_selected_window |
5148 |
= selected_window; |
= selected_window; |
5188 |
else if (EQ (leaf_windows[i]->buffer, new_current_buffer)) |
else if (EQ (leaf_windows[i]->buffer, new_current_buffer)) |
5189 |
++n; |
++n; |
5190 |
} |
} |
|
|
|
|
/* If more than one window shows the new and old current buffer, |
|
|
don't try to preserve point in that buffer. */ |
|
|
if (old_point > 0 && n > 1) |
|
|
old_point = -1; |
|
5191 |
|
|
5192 |
adjust_glyphs (f); |
adjust_glyphs (f); |
5193 |
|
|
5207 |
} |
} |
5208 |
|
|
5209 |
if (!NILP (new_current_buffer)) |
if (!NILP (new_current_buffer)) |
5210 |
{ |
Fset_buffer (new_current_buffer); |
|
Fset_buffer (new_current_buffer); |
|
|
|
|
|
/* If the buffer that is current now is the same |
|
|
that was current before setting the window configuration, |
|
|
don't alter its PT. */ |
|
|
if (old_point >= 0) |
|
|
SET_PT (old_point); |
|
|
} |
|
5211 |
|
|
5212 |
/* Restore the minimum heights recorded in the configuration. */ |
/* Restore the minimum heights recorded in the configuration. */ |
5213 |
window_min_height = XINT (data->min_height); |
window_min_height = XINT (data->min_height); |