emacs-devel
[Top][All Lists]
Advanced

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

Re: Problem with revert-buffer and overlays


From: martin rudalics
Subject: Re: Problem with revert-buffer and overlays
Date: Mon, 28 Nov 2005 11:17:59 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> This seems to be a generic problem with revert-buffer, as other modes
> may also have overlays in the buffer which should be removed by
> revert-buffer.  It seems like it should unconditionally delete all
> overlays in that buffer.
>
> Perhaps things which kills all local variables should also kill all
> overlays in the buffer.

> It should be done in revert-buffer, I think.
> after-find-file is not the right place,
> and normal-mode should NOT mess with overlays.

Why not do this in kill-all-local-variables then?

Although solving this problem is tricky in general.  Consider two
buffers A and B.  A buffer-local variable in A may reference an overlay
in buffer B.  When A is reverted how remove the overlay in B?

>     BTW, I noticed that revert-buffer does not deactivate the mark.
>
> That seems like a bug, too.

Deactivating the mark would have to be done by insert-file-contents if
it finds out that the mark has been invalidated during reversion.  I'd
leave this alone until someone complains.  In a similar way, I don't
think it necessary to remove the CUA rectangle when a buffer is
reverted.





reply via email to

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