+2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Cleanup overlays checking.
+ * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
+ * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
+ eassert and OVERLAYP.
+ (sort_overlays): Change to use OVERLAYP.
+
2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
* editfns.c (Finsert_char): Make it interactive, and make the
ptrdiff_t endpos;
XSETMISC (overlay ,tail);
- if (!OVERLAYP (overlay))
- abort ();
+ eassert (OVERLAYP (overlay));
endpos = OVERLAY_POSITION (OVERLAY_END (overlay));
if (endpos < pos)
ptrdiff_t startpos;
XSETMISC (overlay, tail);
- if (!OVERLAYP (overlay))
- abort ();
+ eassert (OVERLAYP (overlay));
startpos = OVERLAY_POSITION (OVERLAY_START (overlay));
if (pos < startpos)
Lisp_Object overlay;
overlay = overlay_vec[i];
- if (OVERLAY_VALID (overlay)
+ if (OVERLAYP (overlay)
&& OVERLAY_POSITION (OVERLAY_START (overlay)) > 0
&& OVERLAY_POSITION (OVERLAY_END (overlay)) > 0)
{
{
next = tail->next;
XSETMISC (overlay, tail);
-
- /* If the overlay is not valid, get rid of it. */
- if (!OVERLAY_VALID (overlay))
-#if 1
- abort ();
-#else
- {
- /* Splice the cons cell TAIL out of overlays_before. */
- if (!NILP (prev))
- XCDR (prev) = next;
- else
- buf->overlays_before = next;
- tail = prev;
- continue;
- }
-#endif
+ eassert (OVERLAYP (overlay));
beg = OVERLAY_START (overlay);
end = OVERLAY_END (overlay);
Lisp_Object otherbeg, otheroverlay;
XSETMISC (otheroverlay, other);
- eassert (OVERLAY_VALID (otheroverlay));
+ eassert (OVERLAYP (otheroverlay));
otherbeg = OVERLAY_START (otheroverlay);
if (OVERLAY_POSITION (otherbeg) >= where)
{
next = tail->next;
XSETMISC (overlay, tail);
-
- /* If the overlay is not valid, get rid of it. */
- if (!OVERLAY_VALID (overlay))
-#if 1
- abort ();
-#else
- {
- /* Splice the cons cell TAIL out of overlays_after. */
- if (!NILP (prev))
- XCDR (prev) = next;
- else
- buf->overlays_after = next;
- tail = prev;
- continue;
- }
-#endif
+ eassert (OVERLAYP (overlay));
beg = OVERLAY_START (overlay);
end = OVERLAY_END (overlay);
Lisp_Object otherend, otheroverlay;
XSETMISC (otheroverlay, other);
- eassert (OVERLAY_VALID (otheroverlay));
+ eassert (OVERLAYP (otheroverlay));
otherend = OVERLAY_END (otheroverlay);
if (OVERLAY_POSITION (otherend) <= where)