diff options
| author | Stefan Monnier | 2013-04-08 14:04:58 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-04-08 14:04:58 -0400 |
| commit | 7ffe7ef6ba59f3ac5728dc7b782de5082e22aad9 (patch) | |
| tree | bfe8f33a251bb3c2e8f06a9bfeb444d849f0c342 /src | |
| parent | 6fcdab68b3e73354fb17f4c8c4f8199d6f63cf30 (diff) | |
| download | emacs-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')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/fns.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 10 | ||||
| -rw-r--r-- | src/window.c | 17 |
4 files changed, 23 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cb6930f9acc..04dcee7b6eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * window.c (select_window): Don't record_buffer while the invariant is | ||
| 4 | temporarily broken (bug#14161). | ||
| 5 | |||
| 6 | * fns.c (Fdelq): Don't assume !NILP => CONSP. | ||
| 7 | |||
| 1 | 2013-04-07 Eli Zaretskii <eliz@gnu.org> | 8 | 2013-04-07 Eli Zaretskii <eliz@gnu.org> |
| 2 | 9 | ||
| 3 | * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT. | 10 | * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT. |
| @@ -1551,7 +1551,7 @@ the value of a list `foo'. */) | |||
| 1551 | 1551 | ||
| 1552 | tail = list; | 1552 | tail = list; |
| 1553 | prev = Qnil; | 1553 | prev = Qnil; |
| 1554 | while (!NILP (tail)) | 1554 | while (CONSP (tail)) |
| 1555 | { | 1555 | { |
| 1556 | CHECK_LIST_CONS (tail, list); | 1556 | CHECK_LIST_CONS (tail, list); |
| 1557 | tem = XCAR (tail); | 1557 | tem = XCAR (tail); |
diff --git a/src/keyboard.c b/src/keyboard.c index beba3025887..b4fafa22e41 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -72,7 +72,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 72 | #include TERM_HEADER | 72 | #include TERM_HEADER |
| 73 | #endif /* HAVE_WINDOW_SYSTEM */ | 73 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 74 | 74 | ||
| 75 | /* Variables for blockinput.h: */ | 75 | /* Variables for blockinput.h: */ |
| 76 | 76 | ||
| 77 | /* Positive if interrupt input is blocked right now. */ | 77 | /* Positive if interrupt input is blocked right now. */ |
| 78 | volatile int interrupt_input_blocked; | 78 | volatile int interrupt_input_blocked; |
| @@ -4337,10 +4337,10 @@ timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers) | |||
| 4337 | } | 4337 | } |
| 4338 | 4338 | ||
| 4339 | idle_timer_ripe = EMACS_TIME_LE (idle_timer_time, idleness_now); | 4339 | idle_timer_ripe = EMACS_TIME_LE (idle_timer_time, idleness_now); |
| 4340 | idle_timer_difference = | 4340 | idle_timer_difference |
| 4341 | (idle_timer_ripe | 4341 | = (idle_timer_ripe |
| 4342 | ? sub_emacs_time (idleness_now, idle_timer_time) | 4342 | ? sub_emacs_time (idleness_now, idle_timer_time) |
| 4343 | : sub_emacs_time (idle_timer_time, idleness_now)); | 4343 | : sub_emacs_time (idle_timer_time, idleness_now)); |
| 4344 | } | 4344 | } |
| 4345 | 4345 | ||
| 4346 | /* Decide which timer is the next timer, | 4346 | /* Decide which timer is the next timer, |
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 |