Subject: bug#76313: New function `replace-region`

From: Stefan Monnier <[email-masked]>
Date: Mon, 17 Feb 2025 22:38:22 -0500

Stefan Monnier [2025-02-17 15:55:04] wrote:
> I just want a simple function which does the same as
> `insert+delete-region`, just as efficiently, without having to think
> about which way is best (should I delete first, or insert first?
> If I insert first, should I insert at FROM, or at TO, or in the
> middle?  You can find pretty much all variations out there, several
> times with comments showing that the coders did have to waste time
> thinking about it).

IOW, just like `oddp/evenp` saves coders the trouble of wondering
whether to implement it using `%` or `logand` or whatnot.

        Stefan