From: Richard M. Stallman Date: Thu, 23 Dec 1993 04:53:48 +0000 (+0000) Subject: (vip-replace-string): Don't use replace-regexp. X-Git-Tag: emacs-19.34~10543 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5975546182c203c04b712f07414595daf894a4c0;p=emacs.git (vip-replace-string): Don't use replace-regexp. --- 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)))))))