# HG changeset patch # User Gerd Moellmann # Date 975932736 0 # Node ID 3b3a64fbcb057b0023d1963c15e47eb4ae457944 # Parent cfbe6873d4948f4c14f7468fb17f75857812c020 (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. diff -r cfbe6873d494 -r 3b3a64fbcb05 src/editfns.c --- a/src/editfns.c Mon Dec 04 12:22:46 2000 +0000 +++ b/src/editfns.c Mon Dec 04 12:25:36 2000 +0000 @@ -841,12 +841,13 @@ } /* If buffer was visible in a window, and a different window was - selected, and the old selected window is still live, restore - point in that window. */ + selected, and the old selected window is still showing this + buffer, restore point in that window. */ tem = XCDR (info); if (visible_p && !EQ (tem, selected_window) - && !NILP (Fwindow_live_p (tem))) + /* This also verifies that the window is still live. */ + && XBUFFER (XWINDOW (tem)->buffer) == current_buffer) Fset_window_point (tem, make_number (PT)); UNGCPRO;