CLISP prompt consists of 3 mandatory parts: “start”,
“body”, and “finish”; and 2 optional parts:
“break”, which appears only in the debugger (after BREAK
or ERROR), and “step”, which appears only in the STEPer.
Each part is controlled by a custom variable, which can be either a
STRING or a FUNCTION of no arguments returning a STRING
(if it is something else - or if the return value was not a STRING
- it is printed with PRINC). In the order of invocation:
CUSTOM:*PROMPT-START*CUSTOM:*PROMPT-STEP*STEPping.
Defaults to “Step n ”,
where n is the stepping level as returned by EXT:STEP-LEVEL.
CUSTOM:*PROMPT-BREAK*Break n ”,
where n is the break level as returned by EXT:BREAK-LEVEL.
CUSTOM:*PROMPT-BODY*package[n]”
where package is the shortest (nick)name (as returned by
EXT:PACKAGE-SHORTEST-NAME) of the current package *PACKAGE*
if it is not the same as it was in the beginning
(determined by EXT:PROMPT-NEW-PACKAGE)
or if it does not contain symbol T,
(it is assumed that in the latter case you would want to keep in
mind that your current package is something weird);
and n is the index of the current prompt, kept in EXT:*COMMAND-INDEX*.
CUSTOM:*PROMPT-FINISH*> ”.
To facilitate your own custom prompt creation, the following functions and variables are available:
EXT:BREAK-LEVELFUNCTION returns current BREAK/ERROR level.
EXT:STEP-LEVELFUNCTION returns current STEP level.
EXT:PROMPT-NEW-PACKAGEFUNCTION returns *PACKAGE* or NIL
if the current package is the same as it was initially.
EXT:PACKAGE-SHORTEST-NAMEFUNCTION takes one argument, a
PACKAGE, and returns its shortest name or nickname.
EXT:*COMMAND-INDEX*| These notes document CLISP version 2.49 | Last modified: 2010-07-07 |