The basic cut and paste commands are shown in
Table
.
Table: Basic Cutting and Pasting
DELETE-CHAR-TO-LEFT and DELETE-CHAR-TO-RIGHT are conventional character deletion commands. They can be used in any text slot of a term or in a text sequence. They will also work on newline terms in text sequences. They do not save the character on the save stack.
CUT-WORD-TO-RIGHT cuts the word to the right of a text cursor. For convenience if a term is to the immediate right of a text cursor in a text sequence, then that term is cut.
CUT, SAVE, AND DELETE all work on a term underneath a term cursor. SAVE pushes a copy of the term onto the save stack leaving the term itself in place, DELETE deletes the term, leaving an empty term slot, and CUT is the same as a SAVE followed by a DELETE. These commands work fine on terms in text and term sequences.
When a term cursor is at an empty term slot, the PASTE and PASTE-COPY commands paste the term on top of the stack into the slot. PASTE always removes the term from the top of the save stack, so successive pastes retrieve successively-earlier cut terms. PASTE-COPY is like PASTE, except the item pasted is also left on top of the save stack. This is useful if you want to make several copies of an item.
PASTE-NEXT is only intended to be used immediately after a PASTE or a previous PASTE-NEXT. It deletes the last term pasted, and replaces it with the term before on the save stack. By repeating PASTE-NEXT, you can search back through the save stack for some desired term.