The recursive-restart Reference Manual

This is the recursive-restart Reference Manual, version 1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:35:26 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 recursive-restart

Restarts that can invoke themselves.

Maintainer

Jeremy Phelps

Author

Jeremy Phelps

License

MIT

Long Description

Restarts that can invoke themselves.

Version

1

Dependency

alexandria (system).

Source

recursive-restart.asd.

Child Component

recursive-restart.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 recursive-restart/recursive-restart.asd

Source

recursive-restart.asd.

Parent Component

recursive-restart (system).

ASDF Systems

recursive-restart.


3.1.2 recursive-restart/recursive-restart.lisp

Source

recursive-restart.asd.

Parent Component

recursive-restart (system).

Packages

recursive-restart.

Public Interface
Internals

restart-labels (macro).


4 Packages

Packages are listed by definition order.


4.1 recursive-restart

Source

recursive-restart.lisp.

Use List
  • alexandria.
  • common-lisp.
Public Interface
Internals

restart-labels (macro).


5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: do-restart (bindings &body body)

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!"))

Package

recursive-restart.

Source

recursive-restart.lisp.

Macro: handler-bind* (bindings &body body)

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))

Package

recursive-restart.

Source

recursive-restart.lisp.

Macro: handler-return (bindings &body body)

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)))

Package

recursive-restart.

Source

recursive-restart.lisp.

Macro: recursive-restart-case (value-form &rest cases)

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))))

Package

recursive-restart.

Source

recursive-restart.lisp.

Macro: restart-bind* (bindings &body body)

Analogous to the relation between let and let*.

(restart-bind* ((retry (lambda (c) (invoke-restart ’continue))) (continue (lambda (c) (print :retry))))
(error "error!"))

Package

recursive-restart.

Source

recursive-restart.lisp.

Macro: restart-return (bindings &body body)

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.

Package

recursive-restart.

Source

recursive-restart.lisp.


5.2 Internals


5.2.1 Macros

Macro: restart-labels (bindings &body body)
Package

recursive-restart.

Source

recursive-restart.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables