/[emacs]/emacs/src/window.c
ViewVC logotype

Diff of /emacs/src/window.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.496 by kfstorm, Mon Feb 21 22:34:34 2005 UTC revision 1.497 by rms, Sun Apr 10 22:02:41 2005 UTC
# Line 3171  selects the buffer of the selected windo Line 3171  selects the buffer of the selected windo
3171    if (EQ (window, selected_window))    if (EQ (window, selected_window))
3172      return window;      return window;
3173    
3174      /* Store the current buffer's actual point into the
3175         old selected window.  It belongs to that window,
3176         and when the window is not selected, must be in the window.  */
3177    if (!NILP (selected_window))    if (!NILP (selected_window))
3178      {      {
3179        ow = XWINDOW (selected_window);        ow = XWINDOW (selected_window);
# Line 5636  the return value is nil.  Otherwise the Line 5639  the return value is nil.  Otherwise the
5639  #endif  #endif
5640  #endif  #endif
5641    
5642        /* "Swap out" point from the selected window        /* "Swap out" point from the selected window's buffer
5643           into its buffer.  We do this now, before           into the window itself.  (Normally the pointm of the selected
5644             window holds garbage.)  We do this now, before
5645           restoring the window contents, and prevent it from           restoring the window contents, and prevent it from
5646           being done later on when we select a new window.  */           being done later on when we select a new window.  */
5647        if (! NILP (XWINDOW (selected_window)->buffer))        if (! NILP (XWINDOW (selected_window)->buffer))
# Line 5787  the return value is nil.  Otherwise the Line 5791  the return value is nil.  Otherwise the
5791        FRAME_ROOT_WINDOW (f) = data->root_window;        FRAME_ROOT_WINDOW (f) = data->root_window;
5792        /* Prevent "swapping out point" in the old selected window        /* Prevent "swapping out point" in the old selected window
5793           using the buffer that has been restored into it.           using the buffer that has been restored into it.
5794           Use the point value from the beginning of this function           We already swapped out point that from that window's old buffer.  */
          since unshow_buffer (called from delete_all_subwindows)  
          could have altered it.  */  
5795        selected_window = Qnil;        selected_window = Qnil;
5796    
5797          /* Arrange *not* to restore point in the buffer that was
5798             current when the window configuration was saved.  */
5799        if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))        if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
5800          set_marker_restricted (XWINDOW (data->current_window)->pointm,          set_marker_restricted (XWINDOW (data->current_window)->pointm,
5801                                 make_number (old_point),                                 make_number (old_point),

Legend:
Removed from v.1.496  
changed lines
  Added in v.1.497

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26