]> git.eshelyaron.com Git - emacs.git/commitdiff
(vip-replace-string): Don't use replace-regexp.
authorRichard M. Stallman <rms@gnu.org>
Thu, 23 Dec 1993 04:53:48 +0000 (04:53 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 23 Dec 1993 04:53:48 +0000 (04:53 +0000)
lisp/emulation/vip.el

index 3c3076250598aded997762365e2c4ab06eef6644..b710df35f6660e9fab0a5fe247533f16cda332e5 100644 (file)
@@ -926,9 +926,13 @@ the query replace mode will toggle between string replace and regexp replace."
                           (if vip-re-replace "regexp replace"
                             "string replace"))))
       (if vip-re-replace
-         (replace-regexp
-          str
-          (vip-read-string (format "Replace regexp \"%s\" with: " str)))
+         ;; (replace-regexp
+         ;;  str
+         ;;  (vip-read-string (format "Replace regexp \"%s\" with: " str)))
+         (while (re-search-forward str nil t)
+           (replace-match (vip-read-string
+                           (format "Replace regexp \"%s\" with: " str))
+                          nil nil))
        (replace-string
         str
         (vip-read-string (format "Replace \"%s\" with: " str)))))))