help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reverting but keeping undo


From: Barry Margolin
Subject: Re: Reverting but keeping undo
Date: Thu, 30 May 2013 14:45:09 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.699.1369939338.22516.help-gnu-emacs@gnu.org>,
 Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 
> > > `revert-buffer' discards undo history.
> >
> > FWIW, I just installed a patch in Emacs's trunk which makes that
> > revert-buffer doesn't discard undo history any more.
> 
> I wonder how that works.  Generally, the undo history belongs to a
> buffer content different from the content after reverting.  Does your
> patch prevent surprises like "undoing" changes that were never made to
> the newly read-in buffer content?

Maybe the first thing in the undo history is the revert itself. So when 
you undo, you get back the version of the buffer before reverting, and 
further undoes then operate on that content.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]