[plt-scheme] hooking add-to-undo-stack

From: Martin DeMello (martindemello at gmail.com)
Date: Mon Apr 27 09:30:41 EDT 2009

On Mon, Apr 27, 2009 at 4:52 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> I don't have a good answer for implementing this, at least not in a
> backward-compatible way. As you've seen, there're aren't enough of the
> right kind of hooks in place.
> We've long recognized that support for chained undo stack is missing in
> the core, but we never got around to adding it. So, one option is to
> just add it now (which is a lot easier in the SVN trunk than in 4.1.5
> and earlier, since the relevant code is now in Scheme instead of C++).
> I think the addition would involve new undo-related methods in the
> `editor-admin%' and `snip-admin%' classes, and probably also
> undo-related methods in `snip%'. I can look into those additions
> sometime soon. Or, if you're game, you can jump into the code in
> "collects/mred/private/wxme" an send me a patch!

Not sure if I'll be able to, but I'll give it a try :) The code now
being in scheme is a great incentive to get involved. Am I right in
that a callback for when an item is added to the undo stack is the
right starting point?


Posted on the users mailing list.