Page 276 Table of Contents Index Page 278
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

for keystroke accelerator, the corresponding command menu item will be invoked. Note that
command menu items are shared among the command table's menu and the accelerator table.
There are several reasons for this. One is that it is common to have menus display the keystroke
associated with a particular item, if there is one.

Note that, despite the fact the keystroke accelerators are specified using keyboard gesture names
rather than characters, the conventions for typed characters vary widely from one platform to
another. Therefore the programmer must be careful in choosing keystroke accelerators. Some
sort of per-platform conditionalization is to be expected.

=> add-keystroke-to-command-table command-table gesture type value &key documentation (er-
rorp t)
[Function]
Adds a command menu item to command-table's keystroke accelerator table. gesture is a key-
board gesture name to be used as the accelerator. type and value are as in add-menu-item-to-
command-table
, except that type must be either :command, :function or :menu. command-table
is a command table designator.

Minor issue: Should we allow gesture to be a gesture specification as well as just a gesture
name? It simplifies its use by avoiding a profusion of defined gesture names, but we may want
to encourage the use of gesture names. | SWM

documentation is a documentation string, which can be used as documentation for the keystroke
accelerator.

If the command menu item associated with gesture is already present in the command table's
accelerator table and errorp is true, then the command-already-present error will be signalled.
When the item is already present in the command table's accelerator table and errorp is false,
the old item will first be removed.

=> remove-keystroke-from-command-table command-table gesture &key (errorp t) [Function]
Removes the command menu item named by keyboard gesture name gesture from command-
table
's accelerator table. command-table is a command table designator.

If the command menu item associated with gesture is not present in the command table's menu
and errorp is true, then the command-not-present error will be signalled.

=> map-over-command-table-keystrokes function command-table [Function]
Applies function to all of the keystroke accelerators in command-table's accelerator table. func-
tion
must be a function of three arguments, the menu name (which will be nil if there is none),
the keystroke accelerator, and the command menu item; it has dynamic extent. command-table
is a command table designator.

map-over-command-table-keystrokes does not descend into sub-menus. If the programmer
requires this behavior, he should examine the type of the command menu item to see if it is
:menu.


Page 276 Table of Contents Index Page 278
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