[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109110: Cleanup overlays checking.
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109110: Cleanup overlays checking. |
Date: |
Tue, 17 Jul 2012 08:29:50 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109110
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2012-07-17 08:29:50 +0400
message:
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.
modified:
src/ChangeLog
src/buffer.c
src/buffer.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-07-17 04:17:23 +0000
+++ b/src/ChangeLog 2012-07-17 04:29:50 +0000
@@ -1,3 +1,11 @@
+2012-07-17 Dmitry Antipov <address@hidden>
+
+ 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 <address@hidden> (tiny change)
* editfns.c (Finsert_char): Make it interactive, and make the
=== modified file 'src/buffer.c'
--- a/src/buffer.c 2012-07-10 23:24:36 +0000
+++ b/src/buffer.c 2012-07-17 04:29:50 +0000
@@ -2827,8 +2827,7 @@
ptrdiff_t endpos;
XSETMISC (overlay ,tail);
- if (!OVERLAYP (overlay))
- abort ();
+ eassert (OVERLAYP (overlay));
endpos = OVERLAY_POSITION (OVERLAY_END (overlay));
if (endpos < pos)
@@ -2842,8 +2841,7 @@
ptrdiff_t startpos;
XSETMISC (overlay, tail);
- if (!OVERLAYP (overlay))
- abort ();
+ eassert (OVERLAYP (overlay));
startpos = OVERLAY_POSITION (OVERLAY_START (overlay));
if (pos < startpos)
@@ -2898,7 +2896,7 @@
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)
{
@@ -3169,22 +3167,7 @@
{
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);
@@ -3209,7 +3192,7 @@
Lisp_Object otherbeg, otheroverlay;
XSETMISC (otheroverlay, other);
- eassert (OVERLAY_VALID (otheroverlay));
+ eassert (OVERLAYP (otheroverlay));
otherbeg = OVERLAY_START (otheroverlay);
if (OVERLAY_POSITION (otherbeg) >= where)
@@ -3237,22 +3220,7 @@
{
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);
@@ -3282,7 +3250,7 @@
Lisp_Object otherend, otheroverlay;
XSETMISC (otheroverlay, other);
- eassert (OVERLAY_VALID (otheroverlay));
+ eassert (OVERLAYP (otheroverlay));
otherend = OVERLAY_END (otheroverlay);
if (OVERLAY_POSITION (otherend) <= where)
=== modified file 'src/buffer.h'
--- a/src/buffer.h 2012-07-05 18:35:48 +0000
+++ b/src/buffer.h 2012-07-17 04:29:50 +0000
@@ -971,10 +971,6 @@
/* Overlays */
-/* 1 if the OV is an overlay object. */
-
-#define OVERLAY_VALID(OV) (OVERLAYP (OV))
-
/* Return the marker that stands for where OV starts in the buffer. */
#define OVERLAY_START(OV) (XOVERLAY (OV)->start)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109110: Cleanup overlays checking.,
Dmitry Antipov <=