Mercurial > emacs
diff src/window.c @ 83286:9deb6323655c
Merged from miles@gnu.org--gnu-2005 (patch 59, 240-245)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-240
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-241
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-242
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-244
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-245
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-59
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-326
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Mon, 11 Apr 2005 12:40:15 +0000 |
parents | 25f02aeb20f4 8e54037fa085 |
children | 2c2b97b30980 |
line wrap: on
line diff
--- a/src/window.c Fri Apr 08 16:25:22 2005 +0000 +++ b/src/window.c Mon Apr 11 12:40:15 2005 +0000 @@ -3173,6 +3173,9 @@ 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); @@ -5638,8 +5641,9 @@ #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)) @@ -5789,10 +5793,11 @@ 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),