aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1996-09-04 17:13:24 +0000
committerRichard M. Stallman <[email protected]>1996-09-04 17:13:24 +0000
commit3043b0b49099a30ad9004fbc543c1661969644a4 (patch)
tree84a03c839442d851a2c6becfd87c7fec1af4fcbd /lisp
parent8d4e82b502175a979aea6cf651c657f60993133b (diff)
(perform-replace): Increment replace-count
in the places where we do the replacement.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/replace.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 90c66fa47c..cc603d96c0 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -626,21 +626,28 @@ which will run faster and probably do exactly what you want."
(sit-for 1)))
((eq def 'act)
(or replaced
- (replace-match next-replacement nocasify literal))
+ (progn
+ (replace-match next-replacement nocasify literal)
+ (setq replace-count (1+ replace-count))))
(setq done t replaced t))
((eq def 'act-and-exit)
(or replaced
- (replace-match next-replacement nocasify literal))
+ (progn
+ (replace-match next-replacement nocasify literal)
+ (setq replace-count (1+ replace-count))))
(setq keep-going nil)
(setq done t replaced t))
((eq def 'act-and-show)
(if (not replaced)
(progn
(replace-match next-replacement nocasify literal)
+ (setq replace-count (1+ replace-count))
(setq replaced t))))
((eq def 'automatic)
(or replaced
- (replace-match next-replacement nocasify literal))
+ (progn
+ (replace-match next-replacement nocasify literal)
+ (setq replace-count (1+ replace-count))))
(setq done t query-flag nil replaced t))
((eq def 'skip)
(setq done t))
@@ -682,8 +689,7 @@ which will run faster and probably do exactly what you want."
(prog1 (marker-position elt)
(set-marker elt nil))))
(match-data))))
- stack))
- (if replaced (setq replace-count (1+ replace-count)))))
+ stack))))
(setq lastrepl (point)))
(replace-dehighlight))
(or unread-command-events