aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorRichard M. Stallman1999-08-07 16:10:47 +0000
committerRichard M. Stallman1999-08-07 16:10:47 +0000
commitdaa1c1093c456314608784657a70598fe0286cf6 (patch)
treeb51ce06f4171a6b81708f1e86a6ed187dfae55b4 /src/buffer.c
parent5dd6aea87773922b52f9a3f5e3a3df1ce002f1a3 (diff)
downloademacs-daa1c1093c456314608784657a70598fe0286cf6.tar.gz
emacs-daa1c1093c456314608784657a70598fe0286cf6.zip
(Fprevious_overlay_change): Just return the answer obtained from overlays_at.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 8a373979eeb..1b0b5ee988e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2055,7 +2055,7 @@ overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr)
2055 } 2055 }
2056 startpos = OVERLAY_POSITION (start); 2056 startpos = OVERLAY_POSITION (start);
2057 /* This one ends at or after POS 2057 /* This one ends at or after POS
2058 so its start counts for NEXT_PTR if it's before POS. */ 2058 so its start counts for PREV_PTR if it's before POS. */
2059 if (prev < startpos && startpos < pos) 2059 if (prev < startpos && startpos < pos)
2060 prev = startpos; 2060 prev = startpos;
2061 if (endpos == pos) 2061 if (endpos == pos)
@@ -3432,39 +3432,10 @@ If there are no more overlay boundaries before POS, return (point-min).")
3432 3432
3433 /* Put all the overlays we want in a vector in overlay_vec. 3433 /* Put all the overlays we want in a vector in overlay_vec.
3434 Store the length in len. 3434 Store the length in len.
3435 prevpos gets the position of an overlay end. */ 3435 prevpos gets the position of the previous change. */
3436 noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len, 3436 noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
3437 (int *) 0, &prevpos); 3437 (int *) 0, &prevpos);
3438 3438
3439 /* If any of these overlays starts after prevpos,
3440 maybe use its starting point instead. */
3441 for (i = 0; i < noverlays; i++)
3442 {
3443 Lisp_Object ostart;
3444 int ostartpos;
3445
3446 ostart = OVERLAY_START (overlay_vec[i]);
3447 ostartpos = OVERLAY_POSITION (ostart);
3448 if (ostartpos > prevpos && ostartpos < XINT (pos))
3449 prevpos = ostartpos;
3450 }
3451
3452 /* If any overlay ends at pos, consider its starting point too. */
3453 for (tail = current_buffer->overlays_before;
3454 GC_CONSP (tail);
3455 tail = XCONS (tail)->cdr)
3456 {
3457 Lisp_Object overlay, ostart;
3458 int ostartpos;
3459
3460 overlay = XCONS (tail)->car;
3461
3462 ostart = OVERLAY_START (overlay);
3463 ostartpos = OVERLAY_POSITION (ostart);
3464 if (ostartpos > prevpos && ostartpos < XINT (pos))
3465 prevpos = ostartpos;
3466 }
3467
3468 xfree (overlay_vec); 3439 xfree (overlay_vec);
3469 return make_number (prevpos); 3440 return make_number (prevpos);
3470} 3441}