changeset 16129:f6c51da4c4e3

(perform-replace): Increment replace-count in the places where we do the replacement.
author Richard M. Stallman <rms@gnu.org>
date Wed, 04 Sep 1996 17:13:24 +0000
parents 7af77f490166
children 26d9a52f0a27
files lisp/replace.el
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Wed Sep 04 17:02:12 1996 +0000
+++ b/lisp/replace.el	Wed Sep 04 17:13:24 1996 +0000
@@ -626,21 +626,28 @@
 			 (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 @@
 						   (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