[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/window.c
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/window.c |
Date: |
Sun, 10 Apr 2005 18:02:41 -0400 |
Index: emacs/src/window.c
diff -c emacs/src/window.c:1.496 emacs/src/window.c:1.497
*** emacs/src/window.c:1.496 Mon Feb 21 22:34:34 2005
--- emacs/src/window.c Sun Apr 10 22:02:41 2005
***************
*** 3171,3176 ****
--- 3171,3179 ----
if (EQ (window, selected_window))
return window;
+ /* Store the current buffer's actual point into the
+ old selected window. It belongs to that window,
+ and when the window is not selected, must be in the window. */
if (!NILP (selected_window))
{
ow = XWINDOW (selected_window);
***************
*** 5636,5643 ****
#endif
#endif
! /* "Swap out" point from the selected window
! into its buffer. We do this now, before
restoring the window contents, and prevent it from
being done later on when we select a new window. */
if (! NILP (XWINDOW (selected_window)->buffer))
--- 5639,5647 ----
#endif
#endif
! /* "Swap out" point from the selected window's buffer
! into the window itself. (Normally the pointm of the selected
! window holds garbage.) We do this now, before
restoring the window contents, and prevent it from
being done later on when we select a new window. */
if (! NILP (XWINDOW (selected_window)->buffer))
***************
*** 5787,5796 ****
FRAME_ROOT_WINDOW (f) = data->root_window;
/* Prevent "swapping out point" in the old selected window
using the buffer that has been restored into it.
! Use the point value from the beginning of this function
! since unshow_buffer (called from delete_all_subwindows)
! could have altered it. */
selected_window = Qnil;
if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
set_marker_restricted (XWINDOW (data->current_window)->pointm,
make_number (old_point),
--- 5791,5801 ----
FRAME_ROOT_WINDOW (f) = data->root_window;
/* Prevent "swapping out point" in the old selected window
using the buffer that has been restored into it.
! We already swapped out point that from that window's old buffer. */
selected_window = Qnil;
+
+ /* Arrange *not* to restore point in the buffer that was
+ current when the window configuration was saved. */
if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
set_marker_restricted (XWINDOW (data->current_window)->pointm,
make_number (old_point),
- [Emacs-diffs] Changes to emacs/src/window.c,
Richard M . Stallman <=