MTS 8: LISP and SLIP in MTS
Page Revised January 1983 June 1976
88 LISP

MTS 8: LISP and SLIP in MTS
June 1976
THE LISP EDITOR _______________
INTRODUCTION ____________
The LISP editor is a LISP program designed to examine and modify LISP
data structures, especially function definitions, as they exist within
the LISP interpreter. It does not edit MTS files, although there are
LISP editor commands which will read and write files on request. In the
following section, the term "expression" refers to any LISP data
structure (which is also known as an S-expression, denoting its external
representation).
The LISP editor has been checkpointed into the public file *LISPLIB.
It is automatically restored and invoked, using a command of the form
(EDIT fn)
The value of EDIT is NIL. The argument "fn" determines the expression
to edited as follows:
(1) If "fn" is an atom with an EXPR on its property list, then the
value of the EXPR property (normally a LAMBDA expression) is the
expression to be edited. This is the normal method of editing
function definitions.
(2) Otherwise, "fn" itself is the expression to be edited. Since
EDIT is an FSUBR, "fn" is not evaluated. Thus, the above form
is not normally useful for editing arbitrary structures. APPLY
or APPLY1 should be used instead, e.g.,
(APPLY1 ’EDIT list)
where the value of "list" is the expression to be edited.
The editor has its own command language; one or more commands may be
entered on each line, separated by blanks. There are several variable
length commands which must be separated from any subsequent commands on
the same line by a colon (:). These are INSERT, DELETE, EXTRACT, ML,
MR, BI, and BO, and are described in the subsection "Commands that
Modify the Current Expression." Commands are read from *SOURCE* using
the prefix character period (.), and output is written on *SINK*, using
the prefix colon.
All editor commands operate on a subexpression of the original
argument to EDIT; this subexpression is called the current expression. _______ __________
There are several commands available for specifying the current expres-
sion. They are described in later in this section.
The LISP Editor 89
Previous Page Next Page