1132 |
(unwind-protect |
(unwind-protect |
1133 |
;; Loop finding occurrences that perhaps should be replaced. |
;; Loop finding occurrences that perhaps should be replaced. |
1134 |
(while (and keep-going |
(while (and keep-going |
1135 |
(not (eobp)) |
(not (or (eobp) (and limit (>= (point) limit)))) |
1136 |
;; Use the next match if it is already known; |
;; Use the next match if it is already known; |
1137 |
;; otherwise, search for a match after moving forward |
;; otherwise, search for a match after moving forward |
1138 |
;; one char if progress is required. |
;; one char if progress is required. |
1148 |
;; character too far at the end, |
;; character too far at the end, |
1149 |
;; but this is undone after the |
;; but this is undone after the |
1150 |
;; while-loop. |
;; while-loop. |
1151 |
(progn (forward-char 1) (not (eobp)))) |
(progn |
1152 |
|
(forward-char 1) |
1153 |
|
(not (or (eobp) |
1154 |
|
(and limit (>= (point) limit)))))) |
1155 |
(funcall search-function search-string limit t) |
(funcall search-function search-string limit t) |
1156 |
;; For speed, use only integers and |
;; For speed, use only integers and |
1157 |
;; reuse the list used last time. |
;; reuse the list used last time. |