6 lines
17 KiB
Plaintext
6 lines
17 KiB
Plaintext
Editing Interlisp Code with SEdit
|
||
The Interlisp editing definitions configure SEdit as an editor for programs written in Interlisp-D, and are ultimately intended as a replacement for DEdit, the system display editor. Although the current system is still missing many convenience features, it currently provides a workable alternative to DEdit. This document provides detailed information on using SEdit as a code editor. It is assumed that the reader has read the introduction to SEdit, and is familiar with the Interlisp-D programming environment. This part of SEdit is under active development; this document will be changed as improvements are made.
|
||
Running SEdit
|
||
After loading SEdit, the function SEdit allows it to be installed and de-installed as the default system display editor. Executing (EDITMODE 'SEDIT) will cause future edit requests (from functions such as DF, from Masterscope, and from inspectors and browsers) to use SEdit instead of DEdit; executing (EDITMODE 'DEDIT) will revert to using DEdit. The function will return the previous editor state (SEDIT or DEDIT).
|
||
Unlike DEdit, SEdit does not run in the process which invokes it. This has some important effects:
|
||
a) SEdit processes can be started and stopped in any order. The windows may be shrunken and kept around indefinitely if desired.
|
||
b) Calls to editing functions such as DF return as soon as the process is started, rather than waiting for the editing to be completed (however, when SEdit is invoked from Masterscope, it forces Masterscope to wait until the user indicates that they are done editing (by closing or shrinking the window); this is simply a convenience to avoid Edit where any commands from immediately covering the screen in hundreds of edit windows).
|
||
c) As a consequence of (b), some functions normally performed by DF (such as informing the file package that the function has been changed and needs to be saved, unsaving the definition of a compiled function, or updating the "last edited" date) are instead performed by SEdit, and often at different times (since SEdit can't wait until the user is "done editing").
|
||
Commands
|
||
At present, SEdit has no attached menu of commands. Many of the commands in DEdit's menu (such as Before, After and Replace) are completely unnecessary in SEdit (because of its more uniform interface). Some of them (such as Delete, and soon ()in and ()out) are provided by keyboard commands. A menu may be added in the future with the introduction of more obscure commands.
|
||
Pointing and Selecting
|
||
Like TEdit, SEdit maintains a current insertion point at which typed, copied, or moved material will be inserted. The point is set by moving the mouse to the desired position and clicking a mouse button, and is indicated by a flashing caret. Unlike TEdit, SEdit has two types of points: structure points and character points. Structure points are allowed within non-atomic structures which have a variable number of components (i.e. lists); they indicate that another Lisp structure can be inserted at the indicated position. In normal (NIL-terminated) lists, structure points can be placed before the first element, after the last element, or between any two adjacent elements; in a non-NIL terminated (dotted) list, points may not be placed anywhere after the dot. Character points are positions at which individual characters may be inserted (rather than whole Lisp structures), and are allowed in atoms and strings. The caret changes to reflect the type of point: structure points look like ' |