🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #188719

Re: undo and replace

#188719
From: Mattias Waldau
Date: Wed, 19 Jun 1991 06:55
24 lines
1596 bytes
In article <1991Jun11.235235.3309@fido.wpd.sgi.com> pdc@lunch.wpd.sgi.com (Paul
Close) writes:
>Is it possible to set up any of the replace functions so that a single undo
>will undo the entire replace?  This is a very attractive behavior, IMHO.  As
>it currently exists, undo only undoes the *last* replace, one by one.  This
>is a real pain if you've changed every line....
>--
>Paul Close           pdc@sgi.com           ...!{ames, decwrl, uunet}!sgi!pdc
>
>    Oh, no!  You walked into the slavering fangs of a lurking grue.
>

Why not patch the source of emacs? There is one general search&replace
function, and in the middle of loop - after each replace - it calls
(undo-boundary). Just remove that call and and insert a call to (undo-boundary)
before the loop. It works fine for me.

(sorry, I am currently not using a unix system and can therefore not give you
the explicit patches)

/mattias

P.s. Could any Emacs-expert tell me wether there are any problems making
this patch. What happens if we replace several millions of characters?
Technical Details
Message-ID: <2084@kuling.UUCP>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!news.funet.fi!sunic!kuling!Mattias
References: <1991Jun11.235235.3309@fido.wpd.sgi.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,f2f9c0a36f338c0b
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-06-19 03:16:01 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!news.funet.fi!sunic!kuling!Mattias
From: Mattias Waldau
Newsgroups: gnu.emacs.help
Subject: Re: undo and replace
Message-ID: <2084@kuling.UUCP>
Date: 19 Jun 91 06:55:42 GMT
References: <1991Jun11.235235.3309@fido.wpd.sgi.com>
Sender: news@kuling.UUCP
Organization: Computing Sci Dept, Uppsala University, Sweden
Lines: 24