(region-end)))))
(perform-replace from-string to-string nil nil delimited nil nil start end))
(put 'replace-string 'interactive-only
- "Use `search-forward' and `replace-match' instead.")
+ "use `search-forward' and `replace-match' instead.")
(defun replace-regexp (regexp to-string &optional delimited start end)
"Replace things after point matching REGEXP with TO-STRING.
(region-end)))))
(perform-replace regexp to-string nil t delimited nil nil start end))
(put 'replace-regexp 'interactive-only
- "Use `re-search-forward' and `replace-match' instead.")
+ "use `re-search-forward' and `replace-match' instead.")
\f
(defvar regexp-history nil
;; so as to override faces copied from the buffer.
`(face ,match-face)))
curstring)
- (setq start (match-end 0))))
+ ;; Avoid infloop (Bug#7593).
+ (let ((end (match-end 0)))
+ (setq start (if (= start end) (1+ start) end)))))
;; Generate the string to insert for this match
(let* ((match-prefix
;; Using 7 digits aligns tabs properly.