emacs-devel
[Top][All Lists]
Advanced

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

Re: TODO


From: Stefan Monnier
Subject: Re: TODO
Date: Wed, 27 Feb 2008 15:45:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>     If the problem is the undo-list, then we can change insert-file-contents
>     to not clear the buffer-undo-list in the case where it did make any
>     changes to the buffer.

I've installed a change that does just that.

> I think this should not be the normal case for insert-file-contents,
> when VISIT = nil.  Rather, it should be a special option to be used in
> particular cases like this.  Perhaps visit = vc?

If `insert-file-contents' does not change any part of the buffer, it's
basically a no-op.  I see hence no reason for it to flush the undo-list
in that case.

AFAIK, flushing the undo list is done on the expectation that the new
content is substantially different, so the original undo-list is only
valid if we add a big undo-entry that represents the changes made by
insert-file-contents (hence making the insert-file-contents operation
undoable).  In the case where the new content is equal to the old
content, we may as well keep the undo-list.


        Stefan




reply via email to

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