Page 265 Table of Contents Index Page 267
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E





Chapter 27

Command Processing

27.1 Commands

A command is an object that represents a user interaction. Commands are stored as a cons
of the command name and a list of the command's arguments. All positional arguments will
be represented in the command object, but only those keywords arguments that were explicitly
supplied by the user will be included. When the first element of the cons is apply'ed to the rest
of the cons, the code representing that interaction is executed.

A partial command is a command object with the value of *unsupplied-argument-marker* in
place of any argument that needs to be filled in.

Every command is named by command name, which is a symbol. To avoid collisions among
command names, application frames should reside in their own package; for example, the com-
show-chart
command might be defined for both a spreadsheet and a medical application.

=> command-name command [Function]
Given a command object command, returns the command name.

=> command-arguments command [Function]
Given a command object command, returns the command's arguments.

=> partial-command-p command [Function]
Returns true if the command is a partial command, that is, has any occurrences of *unsupplied-
argument-marker*
in it. Otherwise, partial-command-p returns false.

=> define-command name-and-options arguments &body body [Macro]
This is the most basic command-defining form. Usually, the programmer will not use define-


Page 265 Table of Contents Index Page 267
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E