NextPrevUpTopContentsIndex

6.3.12 Prompting the user

The following functions can be used to prompt for some kind of input, which is generally typed into the Echo Area.

The following key fields are common to a number of prompting functions.

:prompt

Defines the prompt that is written in the Echo Area. Most prompting functions have a default prompt that is used if no value is supplied for :prompt .

:must-exist

Specifies whether the value that is input by the user must be an existing value or not. If :must-exist is non- nil , the user is prompted again if a non-existent value is input.

:default

Defines the default value that is selected if an empty string is input.

:default-string

Specifies the string that may be edited by the user (with Insert Parse Default).

:help

Provides a help message that is printed if the user types " ? ".

editor:prompt-for-file

Function

editor:prompt-for-file &key prompt must-exist default default-string help

Prompts for a file name, and returns a pathname. See above for an explanation of the keywords.

editor:prompt-for-buffer

Function

editor:prompt-for-buffer &key prompt must-exist default default-string help

Prompts for a buffer name, and returns the buffer. See above for an explanation of the keywords.

The default value of must-exist is t . If must-exist is nil and the buffer does not exist, it is created.

editor:prompt-for-integer

Function

editor:prompt-for-integer &key prompt must-exist default help

Prompts for an integer. See above for an explanation of the keywords.

editor:prompt-for-string

Function

editor:prompt-for-string &key prompt default default-string clear-echo-area help

Prompts for a string. No checking is done on the input. The keyword clear-echo-area controls whether or not the echo area is cleared (that is, whether the text being replaced is visible or not). The default for this keyword is t . See above for an explanation of the remaining keywords.

editor:prompt-for-variable

Function

editor:prompt-for-variable &key must-exist prompt default default-string help

Prompts for an editor variable. See above for an explanation of the keywords. The default value of must-exist is t .


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

NextPrevUpTopContentsIndex