diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-04-10 22:02:41 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-04-10 22:02:41 +0000 |
commit | a46c015333f5df78b768dc1a3eb8c2e304481c39 (patch) | |
tree | 026dd37edb3a4a6360e3fd97451e6e9cb4b710a7 /src | |
parent | 4f79343e097e48b6c99cc8cd042b81758307c3bb (diff) | |
download | emacs-a46c015333f5df78b768dc1a3eb8c2e304481c39.tar.gz emacs-a46c015333f5df78b768dc1a3eb8c2e304481c39.tar.bz2 emacs-a46c015333f5df78b768dc1a3eb8c2e304481c39.zip |
Comment changes.
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c index 93495afb1a5..988b663cbba 100644 --- a/src/window.c +++ b/src/window.c @@ -3171,6 +3171,9 @@ selects the buffer of the selected window before each command. */) 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,8 +5639,9 @@ the return value is nil. Otherwise the value is t. */) #endif #endif - /* "Swap out" point from the selected window - into its buffer. We do this now, before + /* "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,10 +5791,11 @@ the return value is nil. Otherwise the value is t. */) 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. */ + 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), |