aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2005-12-01 16:25:15 +0000
committerStefan Monnier2005-12-01 16:25:15 +0000
commite67a1dea3e622d61024b2dc17c36831d048bb271 (patch)
treea730701839615c50ac0e53a367401c84548cb5f6 /src
parent9f6efa0c78099f2f028c4db1db5a58567a1cfb4e (diff)
downloademacs-e67a1dea3e622d61024b2dc17c36831d048bb271.tar.gz
emacs-e67a1dea3e622d61024b2dc17c36831d048bb271.zip
(Fset_window_configuration): Don't accidentally copy the
window-point of one window to another.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/window.c22
2 files changed, 24 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 256172630ef..3c06d253cd2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12005-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * window.c (Fset_window_configuration): Don't accidentally copy the
4 window-point of one window to another.
5
12005-11-30 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> 62005-11-30 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu>
2 7
3 * buffer.c (Fpop_to_buffer): Remove superfluous call to record_buffer. 8 * buffer.c (Fpop_to_buffer): Remove superfluous call to record_buffer.
diff --git a/src/window.c b/src/window.c
index 2e2f6427b5f..e2659885f19 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1969,7 +1969,7 @@ window_loop (type, obj, mini, frames)
1969 GCPRO1 (windows); 1969 GCPRO1 (windows);
1970 best_window = Qnil; 1970 best_window = Qnil;
1971 1971
1972 for (; CONSP (windows); windows = CDR (windows)) 1972 for (; CONSP (windows); windows = XCDR (windows))
1973 { 1973 {
1974 struct window *w; 1974 struct window *w;
1975 1975
@@ -3667,7 +3667,7 @@ temp_output_buffer_show (buf)
3667#endif 3667#endif
3668 set_buffer_internal (old); 3668 set_buffer_internal (old);
3669 3669
3670 if (!EQ (Vtemp_buffer_show_function, Qnil)) 3670 if (!NILP (Vtemp_buffer_show_function))
3671 call1 (Vtemp_buffer_show_function, buf); 3671 call1 (Vtemp_buffer_show_function, buf);
3672 else 3672 else
3673 { 3673 {
@@ -5831,7 +5831,23 @@ the return value is nil. Otherwise the value is t. */)
5831 else 5831 else
5832 { 5832 {
5833 if (XBUFFER (new_current_buffer) == current_buffer) 5833 if (XBUFFER (new_current_buffer) == current_buffer)
5834 old_point = PT; 5834 /* The code further down "preserves point" by saving here PT in
5835 old_point and then setting it later back into PT. When the
5836 current-selected-window and the final-selected-window both show
5837 the current buffer, this suffers from the problem that the
5838 current PT is the window-point of the current-selected-window,
5839 while the final PT is the point of the final-selected-window, so
5840 this copy from one PT to the other would end up moving the
5841 window-point of the final-selected-window to the window-point of
5842 the current-selected-window. So we have to be careful which
5843 point of the current-buffer we copy into old_point. */
5844 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)
5845 && WINDOWP (selected_window)
5846 && EQ (XWINDOW (selected_window)->buffer, new_current_buffer)
5847 && !EQ (selected_window, data->current_window))
5848 old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos;
5849 else
5850 old_point = PT;
5835 else 5851 else
5836 /* BUF_PT (XBUFFER (new_current_buffer)) gives us the position of 5852 /* BUF_PT (XBUFFER (new_current_buffer)) gives us the position of
5837 point in new_current_buffer as of the last time this buffer was 5853 point in new_current_buffer as of the last time this buffer was