A while ago, I made the suggestion to implement undo by using descriptors.

This page describes the original proposal, adapted for Leo. It explains in detail how the undo proposal works, and demonstrates how the idea can be used to make the "insert node" command undoable.

Here are the two "thin" leo files with the documentation, and the basic undo class: