emacs-devel
[Top][All Lists]
Advanced

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

Re: Adding refactoring capabilities to Emacs


From: João Távora
Subject: Re: Adding refactoring capabilities to Emacs
Date: Thu, 7 Sep 2023 23:14:09 +0100

On Thu, Sep 7, 2023 at 8:27 PM Ihor Radchenko <yantar92@posteo.net> wrote:
>
> Ihor Radchenko <yantar92@posteo.net> writes:
>
> >> How would a user undo such an operation in case of a multi-file edit?
> >> Does the undo system support this?
>
> Actually, it might be possible:
>
> In `buffer-undo-list', one entry type is
>
>     An entry (apply FUN-NAME . ARGS) means undo the change with
>     (apply FUN-NAME ARGS).
>
>     An entry (apply DELTA BEG END FUN-NAME . ARGS) supports selective undo
>     in the active region.  BEG and END is the range affected by this entry
>     and DELTA is the number of characters added or deleted in that range by
>     this change.
>
> This can be used to do anything for undo, including editing other files.

In which of the buffer-undo-list's of changed buffers would you place
the entry?  And how would you handle redo, if at all?  Hurts my brain
just to think about it, but I'd love to see a demo.

João



reply via email to

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