diff options
| author | Gerd Moellmann | 2000-12-04 12:25:36 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-12-04 12:25:36 +0000 |
| commit | 793cd2c862240d14a8f87e7747dba0661892ec6c (patch) | |
| tree | 6f8ccf10363da07c35cb4a162aee919e9a6128b0 /src/editfns.c | |
| parent | e8a5078504f1c7f6431a8389cee571dcdc974945 (diff) | |
| download | emacs-793cd2c862240d14a8f87e7747dba0661892ec6c.tar.gz emacs-793cd2c862240d14a8f87e7747dba0661892ec6c.zip | |
(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.
Diffstat (limited to 'src/editfns.c')
| -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; |