(declare (interactive-only
"use `search-forward' and `replace-match' instead.")
(interactive-args
- (start (if (use-region-p) (region-beginning)))
- (end (if (use-region-p) (region-end)))))
+ (start (use-region-beginning))
+ (end (use-region-end))))
(interactive
(let ((common
(query-replace-read-args
(if (use-region-p) " in region" ""))
nil)))
(list (nth 0 common) (nth 1 common) (nth 2 common)
- (if (use-region-p) (region-beginning))
- (if (use-region-p) (region-end))
+ (use-region-beginning) (use-region-end)
(nth 3 common)
(if (use-region-p) (region-noncontiguous-p)))))
(perform-replace from-string to-string nil nil delimited nil nil start end backward region-noncontiguous-p))