diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) | |||
| 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; |