aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorJoakim Verona2013-04-09 08:30:40 +0200
committerJoakim Verona2013-04-09 08:30:40 +0200
commitb7ef53c752790136ca12dcca9e291bf88c0e5bee (patch)
treebee2a6db58cc40c14638fed1e6ae0414f374ce9f /src/window.c
parent7744b1dba9cb0a83cea2abbc64932a93f28a82e0 (diff)
parentba3b2d88d847cf1669f3f0c340f8864c77fe59de (diff)
downloademacs-b7ef53c752790136ca12dcca9e291bf88c0e5bee.tar.gz
emacs-b7ef53c752790136ca12dcca9e291bf88c0e5bee.zip
auto upstream
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/window.c b/src/window.c
index 77604f4ee19..416d27d2405 100644
--- a/src/window.c
+++ b/src/window.c
@@ -486,12 +486,6 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
486 w = XWINDOW (window); 486 w = XWINDOW (window);
487 w->frozen_window_start_p = 0; 487 w->frozen_window_start_p = 0;
488 488
489 if (NILP (norecord))
490 {
491 w->use_time = ++window_select_count;
492 record_buffer (w->contents);
493 }
494
495 /* Make the selected window's buffer current. */ 489 /* Make the selected window's buffer current. */
496 Fset_buffer (w->contents); 490 Fset_buffer (w->contents);
497 491
@@ -516,6 +510,15 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
516 510
517 select_window_1 (window, inhibit_point_swap); 511 select_window_1 (window, inhibit_point_swap);
518 512
513 /* record_buffer can run QUIT, so make sure it is run only after we have
514 re-established the invariant between selected_window and selected_frame,
515 otherwise the temporary broken invariant might "escape" (bug#14161). */
516 if (NILP (norecord))
517 {
518 w->use_time = ++window_select_count;
519 record_buffer (w->contents);
520 }
521
519 bset_last_selected_window (XBUFFER (w->contents), window); 522 bset_last_selected_window (XBUFFER (w->contents), window);
520 windows_or_buffers_changed++; 523 windows_or_buffers_changed++;
521 return window; 524 return window;
@@ -2930,7 +2933,7 @@ window-start value is reasonable when this function is called. */)
2930 2933
2931 replace_window (root, window, 1); 2934 replace_window (root, window, 1);
2932 2935
2933 /* This must become SWINDOW anyway ....... */ 2936 /* This must become SWINDOW anyway ....... */
2934 if (BUFFERP (w->contents) && !resize_failed) 2937 if (BUFFERP (w->contents) && !resize_failed)
2935 { 2938 {
2936 /* Try to minimize scrolling, by setting the window start to the 2939 /* Try to minimize scrolling, by setting the window start to the