Commit 793cd2c8 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(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.
parent e8a50785
...@@ -841,12 +841,13 @@ save_excursion_restore (info) ...@@ -841,12 +841,13 @@ save_excursion_restore (info)
} }
/* If buffer was visible in a window, and a different window was /* If buffer was visible in a window, and a different window was
selected, and the old selected window is still live, restore selected, and the old selected window is still showing this
point in that window. */ buffer, restore point in that window. */
tem = XCDR (info); tem = XCDR (info);
if (visible_p if (visible_p
&& !EQ (tem, selected_window) && !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)); Fset_window_point (tem, make_number (PT));
UNGCPRO; UNGCPRO;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment