diff options
| author | Stefan Monnier | 2013-11-28 20:14:01 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-11-28 20:14:01 -0500 |
| commit | ef869611180c862f67ef1e004553668523615d37 (patch) | |
| tree | f39030b84dae73ceee754c0e4038bafd06515c1b /src | |
| parent | 0845be757d3782ddc79d92b34a3f728b7555d0de (diff) | |
| download | emacs-ef869611180c862f67ef1e004553668523615d37.tar.gz emacs-ef869611180c862f67ef1e004553668523615d37.zip | |
* src/window.c (Fset_window_configuration): Move select_window later.
Diffstat (limited to 'src')
| -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 8707a6f9d02..3231f5b3f54 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * window.c (Fset_window_configuration): Move select_window later. | ||
| 4 | |||
| 1 | 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | Refine redisplay optimizations to only redisplay *some* frames/windows | 7 | Refine redisplay optimizations to only redisplay *some* frames/windows |
diff --git a/src/window.c b/src/window.c index 6c336f63ecc..ea2618fe94d 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -5742,14 +5742,6 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5742 | make_number (old_point), | 5742 | make_number (old_point), |
| 5743 | XWINDOW (data->current_window)->contents); | 5743 | XWINDOW (data->current_window)->contents); |
| 5744 | 5744 | ||
| 5745 | /* In the following call to `select-window', prevent "swapping out | ||
| 5746 | point" in the old selected window using the buffer that has | ||
| 5747 | been restored into it. We already swapped out that point from | ||
| 5748 | that window's old buffer. */ | ||
| 5749 | select_window (data->current_window, Qnil, 1); | ||
| 5750 | BVAR (XBUFFER (XWINDOW (selected_window)->contents), last_selected_window) | ||
| 5751 | = selected_window; | ||
| 5752 | |||
| 5753 | if (NILP (data->focus_frame) | 5745 | if (NILP (data->focus_frame) |
| 5754 | || (FRAMEP (data->focus_frame) | 5746 | || (FRAMEP (data->focus_frame) |
| 5755 | && FRAME_LIVE_P (XFRAME (data->focus_frame)))) | 5747 | && FRAME_LIVE_P (XFRAME (data->focus_frame)))) |
| @@ -5800,6 +5792,20 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5800 | delete_deletable_window (window); | 5792 | delete_deletable_window (window); |
| 5801 | } | 5793 | } |
| 5802 | 5794 | ||
| 5795 | /* In the following call to `select-window', prevent "swapping out | ||
| 5796 | point" in the old selected window using the buffer that has | ||
| 5797 | been restored into it. We already swapped out that point from | ||
| 5798 | that window's old buffer. */ | ||
| 5799 | /* This `select_window' calls record_buffer which calls Fdelq which | ||
| 5800 | invokes QUIT, so we do it here at the end rather than earlier, | ||
| 5801 | to minimize the risk of interrupting the Fset_window_configuration | ||
| 5802 | in an inconsistent state (e.g. before frame-focus redirection is | ||
| 5803 | canceled). */ | ||
| 5804 | select_window (data->current_window, Qnil, 1); | ||
| 5805 | BVAR (XBUFFER (XWINDOW (selected_window)->contents), | ||
| 5806 | last_selected_window) | ||
| 5807 | = selected_window; | ||
| 5808 | |||
| 5803 | /* Fselect_window will have made f the selected frame, so we | 5809 | /* Fselect_window will have made f the selected frame, so we |
| 5804 | reselect the proper frame here. Fhandle_switch_frame will change the | 5810 | reselect the proper frame here. Fhandle_switch_frame will change the |
| 5805 | selected window too, but that doesn't make the call to | 5811 | selected window too, but that doesn't make the call to |