if (b == cached_buffer && BUF_MODIFF (b) == cached_modiff)
CONSIDER (cached_charpos, cached_bytepos);
- for (tail = BUF_MARKERS (b); tail; tail = tail->next)
- {
- CONSIDER (tail->charpos, tail->bytepos);
-
- /* If we are down to a range of 50 chars,
- don't bother checking any other markers;
- scan the intervening chars directly now. */
- if (best_above - charpos < distance
- || charpos - best_below < distance)
- break;
- else
- distance += BYTECHAR_DISTANCE_INCREMENT;
- }
+ for (tail = BUF_MARKERS (b);
+ /* If we are down to a range of DISTANCE chars,
+ don't bother checking any other markers;
+ scan the intervening chars directly now. */
+ tail && !(best_above - charpos < distance
+ || charpos - best_below < distance);
+ tail = tail->next,
+ distance += BYTECHAR_DISTANCE_INCREMENT)
+ CONSIDER (tail->charpos, tail->bytepos);
/* We get here if we did not exactly hit one of the known places.
We have one known above and one known below.
if (b == cached_buffer && BUF_MODIFF (b) == cached_modiff)
CONSIDER (cached_bytepos, cached_charpos);
- for (tail = BUF_MARKERS (b); tail; tail = tail->next)
- {
- CONSIDER (tail->bytepos, tail->charpos);
-
- /* If we are down to a range of DISTANCE bytes,
- don't bother checking any other markers;
- scan the intervening chars directly now. */
- if (best_above_byte - bytepos < distance
- || bytepos - best_below_byte < distance)
- break;
- else
- distance += BYTECHAR_DISTANCE_INCREMENT;
- }
+ for (tail = BUF_MARKERS (b);
+ /* If we are down to a range of DISTANCE bytes,
+ don't bother checking any other markers;
+ scan the intervening chars directly now. */
+ tail && !(best_above_byte - bytepos < distance
+ || bytepos - best_below_byte < distance);
+ tail = tail->next,
+ distance += BYTECHAR_DISTANCE_INCREMENT)
+ CONSIDER (tail->bytepos, tail->charpos);
/* We get here if we did not exactly hit one of the known places.
We have one known above and one known below.