aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-06-15 14:20:52 +0000
committerRichard M. Stallman2002-06-15 14:20:52 +0000
commit72695e4715e5094196670ef23ad6152b51267649 (patch)
treeee6395bb3196f981e3bc9518cf66990150af51a1 /src
parent568bbe5ed1c38bb0e9dba75a9288f5f1b9edb232 (diff)
downloademacs-72695e4715e5094196670ef23ad6152b51267649.tar.gz
emacs-72695e4715e5094196670ef23ad6152b51267649.zip
(Fset_window_configuration): Explicitly preserve
the point value that new_current_buffer had at the start.
Diffstat (limited to 'src')
-rw-r--r--src/window.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index ffe05bca982..2e0f57dd1a9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4941,6 +4941,7 @@ the return value is nil. Otherwise the value is t. */)
4941 Lisp_Object new_current_buffer; 4941 Lisp_Object new_current_buffer;
4942 Lisp_Object frame; 4942 Lisp_Object frame;
4943 FRAME_PTR f; 4943 FRAME_PTR f;
4944 int old_point = -1;
4944 4945
4945 while (!WINDOW_CONFIGURATIONP (configuration)) 4946 while (!WINDOW_CONFIGURATIONP (configuration))
4946 wrong_type_argument (Qwindow_configuration_p, configuration); 4947 wrong_type_argument (Qwindow_configuration_p, configuration);
@@ -4951,6 +4952,8 @@ the return value is nil. Otherwise the value is t. */)
4951 new_current_buffer = data->current_buffer; 4952 new_current_buffer = data->current_buffer;
4952 if (NILP (XBUFFER (new_current_buffer)->name)) 4953 if (NILP (XBUFFER (new_current_buffer)->name))
4953 new_current_buffer = Qnil; 4954 new_current_buffer = Qnil;
4955 else
4956 old_point = BUF_PT (XBUFFER (new_current_buffer));
4954 4957
4955 frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; 4958 frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame;
4956 f = XFRAME (frame); 4959 f = XFRAME (frame);
@@ -5138,12 +5141,13 @@ the return value is nil. Otherwise the value is t. */)
5138 FRAME_ROOT_WINDOW (f) = data->root_window; 5141 FRAME_ROOT_WINDOW (f) = data->root_window;
5139 /* Prevent "swapping out point" in the old selected window 5142 /* Prevent "swapping out point" in the old selected window
5140 using the buffer that has been restored into it. 5143 using the buffer that has been restored into it.
5141 That swapping out has already been done, 5144 Use the point value from the beginning of this function
5142 near the beginning of this function. */ 5145 since unshow_buffer (called from delete_all_subwindows)
5146 could have altered it. */
5143 selected_window = Qnil; 5147 selected_window = Qnil;
5144 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) 5148 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
5145 set_marker_restricted (XWINDOW (data->current_window)->pointm, 5149 set_marker_restricted (XWINDOW (data->current_window)->pointm,
5146 make_number (BUF_PT (XBUFFER (XWINDOW (data->current_window)->buffer))), 5150 old_point,
5147 XWINDOW (data->current_window)->buffer); 5151 XWINDOW (data->current_window)->buffer);
5148 5152
5149 Fselect_window (data->current_window); 5153 Fselect_window (data->current_window);