Next: , Up: Undo Protocol


18.4.7.1 Protocol Specification

— Condition: drei-undo:no-more-undo

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: drei-undo:undo-tree

Class precedence list: undo-tree, standard-object, slot-object, t

The base class for all undo trees.

— Class: drei-undo:undo-record

Class precedence list: undo-record, standard-object, slot-object, t

The base class for all undo records.

— Class: drei-undo:standard-undo-record

Class precedence list: standard-undo-record, undo-record, standard-object, slot-object, t

Slots:

Standard instantiable class for undo records.

— Generic Function: drei-undo:add-undo record tree

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.

— Generic Function: drei-undo:flip-undo-record 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.

— Generic Function: drei-undo:undo tree &optional n

Move the current state n steps up the undo tree and call flip-undo-record on each step. If the current state is at a level less than n, a no-more-undo condition is signaled and the current state is not moved (and no calls to flip-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.

— Generic Function: drei-undo:redo tree &optional n

Move the current state n steps down the remembered branch of the undo tree and call flip-undo-record on each step. If the remembered branch is shorter than n, a no-more-undo condition is signaled and the current state is not moved (and no calls to flip-undo-record are made).