From: Stefan Monnier Date: Tue, 2 Oct 2012 02:43:53 +0000 (-0400) Subject: * src/buffer.c (Fmake_overlay): Fix last change. X-Git-Tag: emacs-24.2.90~241^2~46 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=64edc7770f7fe5d6912c5f950fb998ae255415d3;p=emacs.git * src/buffer.c (Fmake_overlay): Fix last change. (fix_start_end_in_overlays): Remove redundant recentering. --- diff --git a/src/ChangeLog b/src/ChangeLog index 507fe80c8ab..a199a7b12e5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,7 @@ * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening. (Fmake_overlay): Remove redundant tests. + (fix_start_end_in_overlays): Remove redundant recentering. 2012-10-02 Juanma Barranquero diff --git a/src/buffer.c b/src/buffer.c index 6925675fd5a..425d05ca790 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3689,7 +3689,6 @@ fix_start_end_in_overlays (register ptrdiff_t start, register ptrdiff_t end) beforep->next = current_buffer->overlays_before; set_buffer_overlays_before (current_buffer, before_list); } - recenter_overlay_lists (current_buffer, current_buffer->overlay_center); if (afterp) { @@ -3847,13 +3846,13 @@ for the rear of the overlay advance when text is inserted there end = OVERLAY_END (overlay); if (OVERLAY_POSITION (end) < b->overlay_center) { - eassert (b->overlays_after); + eassert (b->overlays_after || (XOVERLAY (overlay)->next == NULL)); XOVERLAY (overlay)->next = b->overlays_after; set_buffer_overlays_after (b, XOVERLAY (overlay)); } else { - eassert (b->overlays_before); + eassert (b->overlays_before || (XOVERLAY (overlay)->next == NULL)); XOVERLAY (overlay)->next = b->overlays_before; set_buffer_overlays_before (b, XOVERLAY (overlay)); }