Subject: bug#45607: 27.1; compiled replace-string breaks repeat-complex-command

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 09 Aug 2022 17:00:58 +0200

Juri Linkov <[email-masked]> writes:

>> I've now fixed the replace-string problem in Emacs 29.
>
> Should the same interactive-args now be added to other
> replacement commands?

It should be added to all commands that work on the region like this,
yes.  But I wondered whether we should make some trivial helper
functions first like

(defun use-region-beginning ()
  "Return the start of the region if `use-region-p'."
  (and (use-region-p) (region-beginning)))

and the same for -end to avoid having to repeat that code phrase so many
places.