[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I undo a change from a modification-hook?
From: |
Clément Pit-Claudel |
Subject: |
Re: How can I undo a change from a modification-hook? |
Date: |
Thu, 27 Apr 2017 08:58:53 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 2017-04-27 08:48, Stefan Monnier wrote:
>> Of course, I could rewrite the queuing logic to be more resilient to this
>> kind of changes. But the question is about ways to prevent edits, and
>> I think it's more general than this particular example.
>
> Then I woulnd't worry too much about it: the cases where the after-hook
> is called "outside" of the before hook's beg/end are basically bugs and
> IIUC there are no known remaining cases in Emacs-26 (IIRC there are some
> known cases in Emacs-25 where this occurs, mostly in
> insert-file-contents (i.e. revert-buffer)).
Got it, thanks. I already have specialized code for revert-buffer, so that
should be fine.
What happens if a deletion causes an overlay to evaporate? The undo list
doesn't record that, does it? Or will the evaporation be delayed until all
modification hooks have run?
Clément.
- How can I undo a change from a modification-hook?, Clément Pit--Claudel, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Stefan Monnier, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Clément Pit-Claudel, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Stefan Monnier, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Clément Pit-Claudel, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Stefan Monnier, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Clément Pit-Claudel, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Stefan Monnier, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Clément Pit-Claudel, 2017/04/26
- Re: How can I undo a change from a modification-hook?, Stefan Monnier, 2017/04/27
- Re: How can I undo a change from a modification-hook?,
Clément Pit-Claudel <=
- Re: How can I undo a change from a modification-hook?, Stefan Monnier, 2017/04/27