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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: New function `replace-region`
Date: Sat, 15 Feb 2025 17:18:15 -0500
[Message part 1 (text/plain, inline)]
Tags: patch

We often need to replace a chunk of buffer text with something else.
It is easy enough to do with `insert` + `delete-region`, but that
has suboptimal behavior w.r.t markers, so rather than let coders
reinvent a slightly-better replacement I propose we add a dedicated
function for it.

So I suggest the patch below.  Comments?  Objections?


        Stefan
[replace-region.patch (text/patch, attachment)]

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.