NextPrevUpTopContentsIndex

3.4 Prefix arguments

Editor Commands can be supplied with an integer argument which, in many cases, indicates how many times a command is to be executed. This argument is known as a prefix argument as it is supplied before the command to which it is to be applied.

A prefix argument applied to some commands has a special meaning. Documentation to this effect is provided with the command definitions where appropriate in this manual. In most other cases the prefix argument repeats the command a certain number of times, or has no effect.

A prefix argument can be supplied to a command by first using the command Set Prefix Argument ( Ctrl+U ) followed by an integer. Negative prefix arguments are allowed. A prefix argument between 0 and 9 can also be supplied using Alt+ digit .

Set Prefix Argument

Editor Command

Arguments: [ integer ]
Key sequence: Ctrl+U [ integer ]

Provides a prefix argument which, for many commands, indicates the command is to be invoked integer times. The required integer should be input and the command to which it applies invoked without an intervening carriage return.

If no integer is given, the prefix argument defaults to the value of Prefix-Argument-Default.

If Set Prefix Argument is invoked more than once before a command, the prefix arguments associated with each invocation are multiplied together and the command to which the prefix arguments are to be applied is repeated this number of times. For example, if you typed in Ctrl+U Ctrl+U 2 before a command, then that command would be repeated 8 times.

Prefix-Argument-Default

Editor Variable

Default value: 4

The default value for the prefix argument if no integer is provided for Set Prefix Argument.

None

Key Sequence

Key sequence: Alt+<0-9>

Provides a prefix argument in a similar fashion to Set Prefix Argument, except that only integers from 0 to 9 can be used (unless the key bindings are changed).

Negative Argument

Editor Command

Arguments: None
Key sequence: None

Negates the current prefix argument. If there is currently no prefix argument then it is set to -1.

There is rarely any need for explicit use of this command. Negative prefix arguments can be entered directly with Set Prefix Argument by typing a - before the integer.


LispWorks Editor User Guide (Windows version) - 14 Mar 2008

NextPrevUpTopContentsIndex