Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
22a76778
Commit
22a76778
authored
Jun 10, 2004
by
Juri Linkov
Browse files
(perform-replace): Use `limit' to terminate the while-loop explicitly.
parent
c9f0110e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
lisp/replace.el
lisp/replace.el
+5
-2
No files found.
lisp/replace.el
View file @
22a76778
...
...
@@ -1132,7 +1132,7 @@ make, or the user didn't cancel the call."
(
unwind-protect
;; Loop finding occurrences that perhaps should be replaced.
(
while
(
and
keep-going
(
not
(
eobp
))
(
not
(
or
(
eobp
)
(
and
limit
(
>=
(
point
)
limit
))
))
;; Use the next match if it is already known;
;; otherwise, search for a match after moving forward
;; one char if progress is required.
...
...
@@ -1148,7 +1148,10 @@ make, or the user didn't cancel the call."
;; character too far at the end,
;; but this is undone after the
;; while-loop.
(
progn
(
forward-char
1
)
(
not
(
eobp
))))
(
progn
(
forward-char
1
)
(
not
(
or
(
eobp
)
(
and
limit
(
>=
(
point
)
limit
))))))
(
funcall
search-function
search-string
limit
t
)
;; For speed, use only integers and
;; reuse the list used last time.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment