From 5975546182c203c04b712f07414595daf894a4c0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 1993 04:53:48 +0000 Subject: [PATCH] (vip-replace-string): Don't use replace-regexp. --- lisp/emulation/vip.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el index 3c307625059..b710df35f66 100644 --- a/lisp/emulation/vip.el +++ b/lisp/emulation/vip.el @@ -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))))))) -- 2.39.5