diff options
author | Stefan Monnier <[email protected]> | 2013-11-28 20:14:01 -0500 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2013-11-28 20:14:01 -0500 |
commit | ef869611180c862f67ef1e004553668523615d37 (patch) | |
tree | f39030b84dae73ceee754c0e4038bafd06515c1b | |
parent | 0845be757d3782ddc79d92b34a3f728b7555d0de (diff) |
* src/window.c (Fset_window_configuration): Move select_window later.
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/window.c | 22 |
2 files changed, 18 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8707a6f9d0..3231f5b3f5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-11-29 Stefan Monnier <[email protected]> + + * window.c (Fset_window_configuration): Move select_window later. + 2013-11-28 Stefan Monnier <[email protected]> Refine redisplay optimizations to only redisplay *some* frames/windows diff --git a/src/window.c b/src/window.c index 6c336f63ec..ea2618fe94 100644 --- a/src/window.c +++ b/src/window.c @@ -5742,14 +5742,6 @@ the return value is nil. Otherwise the value is t. */) make_number (old_point), XWINDOW (data->current_window)->contents); - /* In the following call to `select-window', prevent "swapping out - point" in the old selected window using the buffer that has - been restored into it. We already swapped out that point from - that window's old buffer. */ - select_window (data->current_window, Qnil, 1); - BVAR (XBUFFER (XWINDOW (selected_window)->contents), last_selected_window) - = selected_window; - if (NILP (data->focus_frame) || (FRAMEP (data->focus_frame) && FRAME_LIVE_P (XFRAME (data->focus_frame)))) @@ -5800,6 +5792,20 @@ the return value is nil. Otherwise the value is t. */) delete_deletable_window (window); } + /* In the following call to `select-window', prevent "swapping out + point" in the old selected window using the buffer that has + been restored into it. We already swapped out that point from + that window's old buffer. */ + /* This `select_window' calls record_buffer which calls Fdelq which + invokes QUIT, so we do it here at the end rather than earlier, + to minimize the risk of interrupting the Fset_window_configuration + in an inconsistent state (e.g. before frame-focus redirection is + canceled). */ + select_window (data->current_window, Qnil, 1); + BVAR (XBUFFER (XWINDOW (selected_window)->contents), + last_selected_window) + = selected_window; + /* Fselect_window will have made f the selected frame, so we reselect the proper frame here. Fhandle_switch_frame will change the selected window too, but that doesn't make the call to |