aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorColin Walters <[email protected]>2002-05-26 20:42:51 +0000
committerColin Walters <[email protected]>2002-05-26 20:42:51 +0000
commit588c915a8e2325a1965bc665b9c8aee008b5da98 (patch)
tree430688ed66268a3a0c5bb0a88efc0356a5fd082d /lisp
parent9b5691bb793571322beb6d5abce7f952f0fdc4b4 (diff)
(perform-replace): Document return value. Use `pop'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/replace.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 9ce2db1eca..82942bc311 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -967,7 +967,10 @@ just as `query-replace' does. Instead, write a simple loop like this:
which will run faster and probably do exactly what you want. Please
see the documentation of `replace-match' to find out how to simulate
-`case-replace'."
+`case-replace'.
+
+This function returns nil if and only if there were no matches to
+make, or the user didn't cancel the call."
(or map (setq map query-replace-map))
(and query-flag minibuffer-auto-raise
(raise-frame (window-frame (minibuffer-window))))
@@ -1123,12 +1126,11 @@ see the documentation of `replace-match' to find out how to simulate
(setq done t))
((eq def 'backup)
(if stack
- (let ((elt (car stack)))
+ (let ((elt (pop stack)))
(goto-char (car elt))
(setq replaced (eq t (cdr elt)))
(or replaced
- (set-match-data (cdr elt)))
- (setq stack (cdr stack)))
+ (set-match-data (cdr elt))))
(message "No previous match")
(ding 'no-terminate)
(sit-for 1)))