changeset 25205:14269f6d315b

(Fprevious_overlay_change): Just return the answer obtained from overlays_at.
author Richard M. Stallman <rms@gnu.org>
date Sat, 07 Aug 1999 16:10:47 +0000
parents 9046b63e8724
children f2c7d7fb6198
files src/buffer.c
diffstat 1 files changed, 2 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Sat Aug 07 16:01:17 1999 +0000
+++ b/src/buffer.c	Sat Aug 07 16:10:47 1999 +0000
@@ -2055,7 +2055,7 @@
 	}
       startpos = OVERLAY_POSITION (start);
       /* This one ends at or after POS
-	 so its start counts for NEXT_PTR if it's before POS.  */
+	 so its start counts for PREV_PTR if it's before POS.  */
       if (prev < startpos && startpos < pos)
 	prev = startpos;
       if (endpos == pos)
@@ -3432,39 +3432,10 @@
 
   /* Put all the overlays we want in a vector in overlay_vec.
      Store the length in len.
-     prevpos gets the position of an overlay end.  */
+     prevpos gets the position of the previous change.  */
   noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
 			   (int *) 0, &prevpos);
 
-  /* If any of these overlays starts after prevpos,
-     maybe use its starting point instead.  */
-  for (i = 0; i < noverlays; i++)
-    {
-      Lisp_Object ostart;
-      int ostartpos;
-
-      ostart = OVERLAY_START (overlay_vec[i]);
-      ostartpos = OVERLAY_POSITION (ostart);
-      if (ostartpos > prevpos && ostartpos < XINT (pos))
-	prevpos = ostartpos;
-    }
-
-  /* If any overlay ends at pos, consider its starting point too.  */
-  for (tail = current_buffer->overlays_before;
-       GC_CONSP (tail);
-       tail = XCONS (tail)->cdr)
-    {
-      Lisp_Object overlay, ostart;
-      int ostartpos;
-
-      overlay = XCONS (tail)->car;
-
-      ostart = OVERLAY_START (overlay);
-      ostartpos = OVERLAY_POSITION (ostart);
-      if (ostartpos > prevpos && ostartpos < XINT (pos))
-	prevpos = ostartpos;
-    }
-
   xfree (overlay_vec);
   return make_number (prevpos);
 }