aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorStefan Monnier2013-04-08 14:04:58 -0400
committerStefan Monnier2013-04-08 14:04:58 -0400
commit7ffe7ef6ba59f3ac5728dc7b782de5082e22aad9 (patch)
treebfe8f33a251bb3c2e8f06a9bfeb444d849f0c342 /src/window.c
parent6fcdab68b3e73354fb17f4c8c4f8199d6f63cf30 (diff)
downloademacs-7ffe7ef6ba59f3ac5728dc7b782de5082e22aad9.tar.gz
emacs-7ffe7ef6ba59f3ac5728dc7b782de5082e22aad9.zip
* src/window.c (select_window): Don't record_buffer while the invariant is
temporarily broken. * src/fns.c (Fdelq): Don't assume !NILP => CONSP. Fixes: debbugs:14161
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 feb5f7b5cc7..2ddf742be99 100644
--- a/src/window.c
+++ b/src/window.c
@@ -485,12 +485,6 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
485 w = XWINDOW (window); 485 w = XWINDOW (window);
486 w->frozen_window_start_p = 0; 486 w->frozen_window_start_p = 0;
487 487
488 if (NILP (norecord))
489 {
490 w->use_time = ++window_select_count;
491 record_buffer (w->contents);
492 }
493
494 /* Make the selected window's buffer current. */ 488 /* Make the selected window's buffer current. */
495 Fset_buffer (w->contents); 489 Fset_buffer (w->contents);
496 490
@@ -515,6 +509,15 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
515 509
516 select_window_1 (window, inhibit_point_swap); 510 select_window_1 (window, inhibit_point_swap);
517 511
512 /* record_buffer can run QUIT, so make sure it is run only after we have
513 re-established the invariant between selected_window and selected_frame,
514 otherwise the temporary broken invariant might "escape" (bug#14161). */
515 if (NILP (norecord))
516 {
517 w->use_time = ++window_select_count;
518 record_buffer (w->contents);
519 }
520
518 bset_last_selected_window (XBUFFER (w->contents), window); 521 bset_last_selected_window (XBUFFER (w->contents), window);
519 windows_or_buffers_changed++; 522 windows_or_buffers_changed++;
520 return window; 523 return window;
@@ -2929,7 +2932,7 @@ window-start value is reasonable when this function is called. */)
2929 2932
2930 replace_window (root, window, 1); 2933 replace_window (root, window, 1);
2931 2934
2932 /* This must become SWINDOW anyway ....... */ 2935 /* This must become SWINDOW anyway ....... */
2933 if (BUFFERP (w->contents) && !resize_failed) 2936 if (BUFFERP (w->contents) && !resize_failed)
2934 { 2937 {
2935 /* Try to minimize scrolling, by setting the window start to the 2938 /* Try to minimize scrolling, by setting the window start to the