Next: Implementation, Up: Undo Protocol
Class precedence list:
no-more-undo, error, serious-condition, condition, slot-object, t
A condition of this type is signaled whenever an attempt is made to call undo when the application is in its initial state.
Class precedence list:
undo-tree, standard-object, slot-object, t
The base class for all undo trees.
Class precedence list:
undo-record, standard-object, slot-object, t
The base class for all undo records.
Class precedence list:
standard-undo-record, undo-record, standard-object, slot-object, t
Slots:
tree
The undo tree to which the undo record belongs.
Standard instantiable class for undo records.
Add an undo record to the undo tree below the current state, and set the current state to be below the transition represented by the undo record.
This function is called by the undo module whenever the current state is changed from its current value to that of the parent state (presumably as a result of a call to undo) or to that of one of its child states.
Client code is required to supply methods for this function on client-specific subclasses of
undo-record
.
Move the current state
n
steps up the undo tree and callflip-undo-record
on each step. If the current state is at a level less thann
, ano-more-undo
condition is signaled and the current state is not moved (and no calls toflip-undo-record
are made).As long as no new record are added to the tree, the undo module remembers which branch it was in before a sequence of calls to undo.
Move the current state
n
steps down the remembered branch of the undo tree and callflip-undo-record
on each step. If the remembered branch is shorter thann
, ano-more-undo
condition is signaled and the current state is not moved (and no calls toflip-undo-record
are made).