file: 01-C-event.t package: muf status: alpha
This function is specified by CommonLisp and
returns the most recent active restart matching
the request, else nil.
The restart argument may be a symbol
naming the restart, or a restart identifier
such as returned by getNthRestart.
If event is nil it is ignored,
otherwise only restarts matching it will be
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:
: findRestart { $ $ -> $ } -> event -> restart
( 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 nil return fi
( If name matches id, return it: )
id restart = if id return fi
( If names and maybe events match, return it: )
name restart = if
event not if id return fi
tFn not if id return fi
event tFn call{ $ -> $ } if id return fi
fi
( Next restart to try: )
i 1 + -> i
}
;
'findRestart export
Go to the first, previous, next, last section, table of contents.