All Manuals > LispWorks® User Guide and Reference Manual > 38 The LISPWORKS Package

define-action-list Macro

Summary

Defines a registered action list.

Package

lispworks

Signature

define-action-list uid &key documentation sort-time dummy-actions default-order execution-function

Arguments
uid
A Lisp object.
documentation
A string.
sort-time
One of :execute or :define-action.
dummy-actions
A list.
default-order
A list.
execution-function
A function.
Description

The macro define-action-list defines an action list.

uid is a unique identifier, and must be a general Lisp object, to be compared by equalp. It names the list in the global registry of action lists. See make-unregistered-action-list to create unnamed, "unregistered" action-lists. uid may be quoted, but is not required to be. It is possible, but not recommended, to define an action-list with unique identifier nil. If a registered action-list already exists with a name equalp to uid, then notification and subsequent handling is controlled by the value of the variable *handle-existing-action-list*.

If documentation is a string, it allows you to provide documentation for the action list.

sort-time is a keyword specifying when added actions are sorted for the given list — either :execute or :define-action (see *default-action-list-sort-time*).

dummy-actions is a list of action-names that specify placeholding actions; they cannot be executed and are constrained to the order specified in this list, for example:

'(:beginning :middle :end)

default-order specifies default ordering constraints for subsequently defined action-items where no explicit ordering constraints are specified. An example is:

'(:after :beginning :before :end)

execution-function specifies a function that you define. It must accept arguments of the form:

(the-action-list other-args-list &rest keyword-value-pairs)

where the two required arguments are the action-list and a list of additional arguments passed to execute-actions, respectively. The remaining arguments are any number of keyword-value pairs that may be specified in the call to execute-actions. If no execution function is specified, then the default execution function will be used to execute the action-list.

See the manual entries for with-action-list-mapping and with-action-item-error-handling for examples of execution-functions.

To add an action to an action list you have defined, use define-action.

See also

*default-action-list-sort-time*
define-action
*handle-existing-action-list*
undefine-action-list
with-action-item-error-handling
with-action-list-mapping


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