MTS 8: LISP and SLIP in MTS
June 1976
Ignoring dotted pairs for the moment, any proper subexpression of a
LISP expression (hence any current expression) must be one of the
following:
(1) An atom.
(2) A list which is an element of some higher level list.
(3) A proper sublist, which will be referred to as the tail of a ____
list.
For example, given the expression (A (B C) D), the atoms are A, B, C,
and D; the list (B C) is an element of the top-level list; the tails of
(A (B C) D) are ((B C) D) and (D); and the tail of (B C) is (C).
Dotted pairs (expressions whose CDR are atoms other than NIL) have
not been adequately described, and indeed, the behavior of the editor is
erratic at best when it encounters a dotted pair.
For the purpose of this description, editor commands are divided into
five major groups: printing commands, commands specifying the current
expression, commands modifying the current expression, commands undoing
previous modifications, and miscellaneous commands.
COMMANDS THAT PRINT THE CURRENT EXPRESSION __________________________________________
Command: P [n]
The P command prints the current expression up to level "n". The
optional argument n defaults to 2. To avoid excessive output,
lists at level n are printed as the character ampersand (&). A
current expression which is a tail of some list is indicated by
ellipsis marks (...) preceding the expression.
A P command is assumed at the end of every line unless a P, ?, or
PP command is the last command on the line.
Command: ?
The ? command is equivalent to a P 1000 command; it effectively
prints the entire current expression. This command is used in most
of the examples in this section.
Command: PP
The PP command also prints the entire current expression, but in an
indented format which makes the structure more clearly visible.
The PP command does not print ellipsis marks for tails of lists.
90 The LISP Editor