comparison src/editfns.c @ 34165:3b3a64fbcb05

(save_excursion_restore): Don't move point in another window if it is showing the wrong buffer. Avoid the call to Fwindow_live_p, for speed.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 04 Dec 2000 12:25:36 +0000
parents e3c81dc17582
children 0370af7597d2
comparison
equal deleted inserted replaced
34164:cfbe6873d494 34165:3b3a64fbcb05
839 else if (! NILP (tem1)) 839 else if (! NILP (tem1))
840 call1 (Vrun_hooks, intern ("deactivate-mark-hook")); 840 call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
841 } 841 }
842 842
843 /* If buffer was visible in a window, and a different window was 843 /* If buffer was visible in a window, and a different window was
844 selected, and the old selected window is still live, restore 844 selected, and the old selected window is still showing this
845 point in that window. */ 845 buffer, restore point in that window. */
846 tem = XCDR (info); 846 tem = XCDR (info);
847 if (visible_p 847 if (visible_p
848 && !EQ (tem, selected_window) 848 && !EQ (tem, selected_window)
849 && !NILP (Fwindow_live_p (tem))) 849 /* This also verifies that the window is still live. */
850 && XBUFFER (XWINDOW (tem)->buffer) == current_buffer)
850 Fset_window_point (tem, make_number (PT)); 851 Fset_window_point (tem, make_number (PT));
851 852
852 UNGCPRO; 853 UNGCPRO;
853 return Qnil; 854 return Qnil;
854 } 855 }