comparison 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
comparison
equal deleted inserted replaced
83285:865f9b91fdbe 83286:9deb6323655c
3171 ++window_select_count; 3171 ++window_select_count;
3172 XSETFASTINT (w->use_time, window_select_count); 3172 XSETFASTINT (w->use_time, window_select_count);
3173 if (EQ (window, selected_window)) 3173 if (EQ (window, selected_window))
3174 return window; 3174 return window;
3175 3175
3176 /* Store the current buffer's actual point into the
3177 old selected window. It belongs to that window,
3178 and when the window is not selected, must be in the window. */
3176 if (!NILP (selected_window)) 3179 if (!NILP (selected_window))
3177 { 3180 {
3178 ow = XWINDOW (selected_window); 3181 ow = XWINDOW (selected_window);
3179 if (! NILP (ow->buffer)) 3182 if (! NILP (ow->buffer))
3180 set_marker_both (ow->pointm, ow->buffer, 3183 set_marker_both (ow->pointm, ow->buffer,
5636 != previous_frame_tool_bar_lines) 5639 != previous_frame_tool_bar_lines)
5637 x_set_tool_bar_lines (f, data->frame_tool_bar_lines, make_number (0)); 5640 x_set_tool_bar_lines (f, data->frame_tool_bar_lines, make_number (0));
5638 #endif 5641 #endif
5639 #endif 5642 #endif
5640 5643
5641 /* "Swap out" point from the selected window 5644 /* "Swap out" point from the selected window's buffer
5642 into its buffer. We do this now, before 5645 into the window itself. (Normally the pointm of the selected
5646 window holds garbage.) We do this now, before
5643 restoring the window contents, and prevent it from 5647 restoring the window contents, and prevent it from
5644 being done later on when we select a new window. */ 5648 being done later on when we select a new window. */
5645 if (! NILP (XWINDOW (selected_window)->buffer)) 5649 if (! NILP (XWINDOW (selected_window)->buffer))
5646 { 5650 {
5647 w = XWINDOW (selected_window); 5651 w = XWINDOW (selected_window);
5787 } 5791 }
5788 5792
5789 FRAME_ROOT_WINDOW (f) = data->root_window; 5793 FRAME_ROOT_WINDOW (f) = data->root_window;
5790 /* Prevent "swapping out point" in the old selected window 5794 /* Prevent "swapping out point" in the old selected window
5791 using the buffer that has been restored into it. 5795 using the buffer that has been restored into it.
5792 Use the point value from the beginning of this function 5796 We already swapped out point that from that window's old buffer. */
5793 since unshow_buffer (called from delete_all_subwindows)
5794 could have altered it. */
5795 selected_window = Qnil; 5797 selected_window = Qnil;
5798
5799 /* Arrange *not* to restore point in the buffer that was
5800 current when the window configuration was saved. */
5796 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) 5801 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
5797 set_marker_restricted (XWINDOW (data->current_window)->pointm, 5802 set_marker_restricted (XWINDOW (data->current_window)->pointm,
5798 make_number (old_point), 5803 make_number (old_point),
5799 XWINDOW (data->current_window)->buffer); 5804 XWINDOW (data->current_window)->buffer);
5800 5805