file: 01-C-event.t package: muf status: alpha
This function is specified by CommonLisp and returns all
active restarts matching the event. If
event is nil, all active restarts are
returned.
(A restart "matches" a event if it has no
test-function, or if that test-function returns
non-nil on that event.)
This function is currently implemented as:
: computeRestarts[ { $ -> [] } -> event
( Create block of restarts to return: )
[ |
( Over all available restarts: )
0 -> i
do{
( Fetch next restart: )
i getNthRestart
-> name
-> fn
-> tFn
-> iFn
-> rFn
-> data
-> id
( Done if no restart found: )
id not if return fi
( Maybe add restart to our collection: )
event if
tFn if
event tFn call{ $ -> $ } if
id |push
fi
else
id |push
fi
else
id |push
fi
( Next restart to try: )
i 1 + -> i
}
;
'computeRestarts[ export
Go to the first, previous, next, last section, table of contents.