GNU bug report logs - #76313
New function `replace-region`

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Sat, 15 Feb 2025 22:19:02 UTC

Severity: normal

Tags: patch

Full log


Message #35 received at 76313 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76313 <at> debbugs.gnu.org
Subject: Re: bug#76313: New function `replace-region`
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





This bug report was last modified 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.