+2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xdisp.c (with_echo_area_buffer_unwind_data): Save window
+ start marker...
+ (unwind_with_echo_area_buffer): ...to restore it here. This
+ is needed to ensure that...
+ (redisplay_window): ...both window markers are valid here,
+ which is verified by eassert.
+ * editfns.c (save_excursion_save): Do not assume that
+ selected_window always displays the buffer.
+
2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
* casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
? Fcopy_marker (BVAR (current_buffer, mark), Qnil)
: Qnil),
/* Selected window if current buffer is shown in it, nil otherwise. */
- ((XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer)
+ (EQ (XWINDOW (selected_window)->buffer, Fcurrent_buffer ())
? selected_window : Qnil),
BVAR (current_buffer, mark_active));
}
Vwith_echo_area_save_vector = Qnil;
if (NILP (vector))
- vector = Fmake_vector (make_number (7), Qnil);
+ vector = Fmake_vector (make_number (9), Qnil);
XSETBUFFER (tmp, current_buffer); ASET (vector, i, tmp); ++i;
ASET (vector, i, Vdeactivate_mark); ++i;
ASET (vector, i, w->buffer); ++i;
ASET (vector, i, make_number (marker_position (w->pointm))); ++i;
ASET (vector, i, make_number (marker_byte_position (w->pointm))); ++i;
+ ASET (vector, i, make_number (marker_position (w->start))); ++i;
+ ASET (vector, i, make_number (marker_byte_position (w->start))); ++i;
}
else
{
- int end = i + 4;
+ int end = i + 6;
for (; i < end; ++i)
ASET (vector, i, Qnil);
}
if (WINDOWP (AREF (vector, 3)))
{
struct window *w;
- Lisp_Object buffer, charpos, bytepos;
+ Lisp_Object buffer;
w = XWINDOW (AREF (vector, 3));
buffer = AREF (vector, 4);
- charpos = AREF (vector, 5);
- bytepos = AREF (vector, 6);
wset_buffer (w, buffer);
set_marker_both (w->pointm, buffer,
- XFASTINT (charpos), XFASTINT (bytepos));
+ XFASTINT (AREF (vector, 5)),
+ XFASTINT (AREF (vector, 6)));
+ set_marker_both (w->start, buffer,
+ XFASTINT (AREF (vector, 7)),
+ XFASTINT (AREF (vector, 8)));
}
Vwith_echo_area_save_vector = vector;
SET_TEXT_POS (lpoint, PT, PT_BYTE);
opoint = lpoint;
- /* W must be a leaf window here. */
- eassert (!NILP (w->buffer));
#ifdef GLYPH_DEBUG
*w->desired_matrix->method = 0;
#endif
+ /* Make sure that both W's markers are valid. */
+ eassert (XMARKER (w->start)->buffer == buffer);
+ eassert (XMARKER (w->pointm)->buffer == buffer);
+
restart:
reconsider_clip_changes (w, buffer);