> I've never heard anyone bump into this "Y undo-redos of X" problem, > so I don't think optimizing it is worth the trouble. Happens to me all the time. > If anything should be done with it, I think it'd be to *cut* the > extra undo/redo pairs. No complaint from me. That would change the behavior of ordinary undo command, which you just said you don't want to change. > I'm not completely convinced that this generator is worthwhile Ok, I'll lose it then. >> I originally set out to do this, but making the weak references >> work seemed overly tricky to me. The value stored in >> undo-redo-table would need to be non weak with weak references to >> undo elements. I supposed this would mean many one element weak >> hash tables. That seems dodgy. > Hmm... that's a very good point. Worth mentioning in a comment. You actually want me to do that? That is: wrap every referenced element in a size 1 weak hash table. Are you sure that gives the memory savings over the element level mapping of the undo-redo-table in the patch?