This is the recursive-restart Reference Manual, version 1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:35:22 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
recursive-restart
Restarts that can invoke themselves.
Jeremy Phelps
Jeremy Phelps
MIT
Restarts that can invoke themselves.
1
alexandria
(system).
recursive-restart.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
recursive-restart/recursive-restart.asd
recursive-restart
(system).
recursive-restart/recursive-restart.lisp
recursive-restart
(system).
do-restart
(macro).
handler-bind*
(macro).
handler-return
(macro).
recursive-restart-case
(macro).
restart-bind*
(macro).
restart-return
(macro).
restart-labels
(macro).
Packages are listed by definition order.
recursive-restart
alexandria
.
common-lisp
.
do-restart
(macro).
handler-bind*
(macro).
handler-return
(macro).
recursive-restart-case
(macro).
restart-bind*
(macro).
restart-return
(macro).
restart-labels
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
A construct that, after a restart is invoked, it jumps to the start and reevaluate
the body by default. Example:
(do-restart ((retry (lambda (c) (print :retry)))
(continue (lambda (c) (print :retry))))
(error "error!"))
Analogous to the relation between let and let*.
In standard handler-bind, the execution of the handler is
’run in a dynamic environment where none of these handler bindings are visible (to
avoid recursive errors).’
– (http://www.lispworks.com/documentation/HyperSpec/Body/m_handle.htm)
(handler-bind* ((error (lambda (c) (print :error)))
(my-error (lambda (c) (print :my) (signal c))))
(error ’my-error))
The variation of handler-case whose behavior is the same but
the semantics are that of HANDLER-BIND.
Just as HANDLER-CASE, the condition is handled first (that is, it jumps
out of the HANDLER-BIND scope with GO) and then
the handler function is called. Finally, HANDLER-RETURN returns
the value of the handler function. Example:
(restart-return ((retry (lambda (c) (print :retry)))
(continue (lambda (c) (print :retry))))
(error "error!"))
is equivalent to:
(restart-case
(error "error!")
(retry (c) (print :retry))
(continue (c) (print :retry)))
RECURSIVE-RESTART-CASE has the same semantics as RESTART-CASE, except
you can re-invoke any of the restarts in a mutually recursive fashion.
Example:
(let ((invoked-bar nil))
(recursive-restart-case
(invoke-restart ’foo)
(foo ()
(format t "Invoked FOO.~%")
(if invoked-bar
:done
(invoke-restart ’bar)))
(bar ()
(format t "Invoked BAR.~%")
(setf invoked-bar t)
(format t "Invoking FOO again...~%")
(invoke-restart ’foo))))
Analogous to the relation between let and let*.
(restart-bind* ((retry (lambda (c) (invoke-restart ’continue)))
(continue (lambda (c) (print :retry))))
(error "error!"))
The variation of restart-case whose behavior is the same but
the semantics are that of RESTART-BIND.
Just as RESTART-CASE, the condition is handled first (that is, it jumps
out of the RESTART-BIND scope with GO) and then
the restart function is called. Finally, RESTART-RETURN returns
the value of restart function.
Jump to: | D H M R |
---|
Jump to: | D H M R |
---|
Jump to: | F P R S |
---|
Jump to: | F P R S |
---|