All Manuals > LispWorks® User Guide and Reference Manual > 33 The COMMON-LISP Package

restart-case Macro

Summary

Evaluates a restartable form in a special dynamic environment.

Package

common-lisp

Signature

restart-case restartable-form {clause}* => result*

clause ::= (case-name lambda-list [[:interactive interactive-expression | :report report-expression | :test test-expression]] {declaration}* {form}*)

Arguments
restartable-form
A form.
case-name
A symbol.
lambda-list
An ordinary lambda list.
interactive-expression
A symbol or a lambda expression.
report-expression
One for string, symbol, lambda expression or a form starting with list.
test-expression
A symbol or a lambda expression.
declaration
A declare expression.
form
A form.
Values
result*
The values of restartable-form or a form.
Description

The macro restart-case behaves as specified in the ANSI Common Lisp standard.

restartable-form, case-name, lambda-list, report-expression, interactive-expression, test-expression, declaration and form can be used as specified by ANSI Common Lisp.

In addition to that specification, report-expression may be a form whose car is list. Such a form is evaluated when the restart is set up and is expected to return a list of a format string and format arguments. When the restart is asked to report, this is done by calling format on the stream, the format string and the format arguments. This is more efficient than specifying an equivalent function, because no function object is created.

See also

restart-case in the Common Lisp HyperSpec


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:30