From: Gerd Moellmann Date: Mon, 4 Dec 2000 12:25:36 +0000 (+0000) Subject: (save_excursion_restore): Don't move point X-Git-Tag: emacs-pretest-21.0.93~252 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=793cd2c862240d14a8f87e7747dba0661892ec6c;p=emacs.git (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 --git a/src/editfns.c b/src/editfns.c index 2fe6468a96e..e83e92f1396 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -841,12 +841,13 @@ save_excursion_restore (info) } /* 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;