* 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
This commit is contained in:
parent
6fcdab68b3
commit
7ffe7ef6ba
4 changed files with 23 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
|||
2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* window.c (select_window): Don't record_buffer while the invariant is
|
||||
temporarily broken (bug#14161).
|
||||
|
||||
* fns.c (Fdelq): Don't assume !NILP => CONSP.
|
||||
|
||||
2013-04-07 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
|
||||
|
|
|
@ -1551,7 +1551,7 @@ the value of a list `foo'. */)
|
|||
|
||||
tail = list;
|
||||
prev = Qnil;
|
||||
while (!NILP (tail))
|
||||
while (CONSP (tail))
|
||||
{
|
||||
CHECK_LIST_CONS (tail, list);
|
||||
tem = XCAR (tail);
|
||||
|
|
|
@ -72,7 +72,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#include TERM_HEADER
|
||||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
||||
/* Variables for blockinput.h: */
|
||||
/* Variables for blockinput.h: */
|
||||
|
||||
/* Positive if interrupt input is blocked right now. */
|
||||
volatile int interrupt_input_blocked;
|
||||
|
@ -4337,10 +4337,10 @@ timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers)
|
|||
}
|
||||
|
||||
idle_timer_ripe = EMACS_TIME_LE (idle_timer_time, idleness_now);
|
||||
idle_timer_difference =
|
||||
(idle_timer_ripe
|
||||
? sub_emacs_time (idleness_now, idle_timer_time)
|
||||
: sub_emacs_time (idle_timer_time, idleness_now));
|
||||
idle_timer_difference
|
||||
= (idle_timer_ripe
|
||||
? sub_emacs_time (idleness_now, idle_timer_time)
|
||||
: sub_emacs_time (idle_timer_time, idleness_now));
|
||||
}
|
||||
|
||||
/* Decide which timer is the next timer,
|
||||
|
|
17
src/window.c
17
src/window.c
|
@ -485,12 +485,6 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
|
|||
w = XWINDOW (window);
|
||||
w->frozen_window_start_p = 0;
|
||||
|
||||
if (NILP (norecord))
|
||||
{
|
||||
w->use_time = ++window_select_count;
|
||||
record_buffer (w->contents);
|
||||
}
|
||||
|
||||
/* Make the selected window's buffer current. */
|
||||
Fset_buffer (w->contents);
|
||||
|
||||
|
@ -515,6 +509,15 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
|
|||
|
||||
select_window_1 (window, inhibit_point_swap);
|
||||
|
||||
/* record_buffer can run QUIT, so make sure it is run only after we have
|
||||
re-established the invariant between selected_window and selected_frame,
|
||||
otherwise the temporary broken invariant might "escape" (bug#14161). */
|
||||
if (NILP (norecord))
|
||||
{
|
||||
w->use_time = ++window_select_count;
|
||||
record_buffer (w->contents);
|
||||
}
|
||||
|
||||
bset_last_selected_window (XBUFFER (w->contents), window);
|
||||
windows_or_buffers_changed++;
|
||||
return window;
|
||||
|
@ -2929,7 +2932,7 @@ window-start value is reasonable when this function is called. */)
|
|||
|
||||
replace_window (root, window, 1);
|
||||
|
||||
/* This must become SWINDOW anyway ....... */
|
||||
/* This must become SWINDOW anyway ....... */
|
||||
if (BUFFERP (w->contents) && !resize_failed)
|
||||
{
|
||||
/* Try to minimize scrolling, by setting the window start to the
|
||||
|
|
Loading…
Add table
Reference in a new issue