A method and apparatus are described for providing an undoable programming
language. More specifically, the present invention relates to providing a
fully undoable programming language, where the language includes a fully
undoable core language portion and a conventional language portion. An
embodiment of the present invention includes a method of determining an
actual target of an event calculating a set of pre-events of the event,
adding the set of pre-events as children of the event, and the set of
pre-events being set to be raised to a pre-queue of the event. The method
also includes applying an event principle to each pre-event of the event
such that a set of protected positions being augmented with an upward
closure of the target, executing the event, if the actual target is
defined and said event is consumable, and applying the event principle to
each post-event of the event.