   SM has two independent but intertwined history systems. One is
similar to that of the Unix C-shell, but using the character ^ instead
of !.  The other is a sort-of-emacs history editor (rather similar to
the history in VMS) which allows the current or previous commands to
be altered and then reused. For details of the ^ history, see HISTORY.
(In fact the character need not be ^, its name is history_char)

For the editor, any command listed by HISTORY LIST may be accessed, except
that now the commands may be edited before re-use. ^-symbols are expanded as
soon as possible, and may then be edited. By default, the editing commands
are bound to the following keys, but these may be changed using the EDIT or
READ EDIT command, this may be done in your startup macro. The editing
commands are :

    ^A       Go to start of line        ^B       Go back one character
    ^C       Interrupt (as usual)       ^D       Delete character
    ^E       Go to end of line          ^F       Go forwards a character
    ^H       Delete previous character  ^I (TAB) Insert spaces to next tab
    ^J (LF)  Send line to be executed   ^K       Delete and save to eol
    ^L       Redraw line                ^M (CR)  Send line to be executed
    ^N       Get the next command       ^O       Execute previous line
    ^P       Get the previous command   ^Q       Quote next character
    ^R       Search backwards           ^S       Search forwards
    ^T       Toggle insert/overwrite    ^U       Delete to start of line
    ^V       Forward 5 lines            ^W       Delete previous word
    ^X       Quit macro editor          ^Y       Restore the last ^K deletion
    ^Z       Attach to the operating system
    ESC-<    Go to start of macro       ESC->    Go to end of macro/history
    ESC-^D   Delete line (and remove from history list)
    ESC-g    Go to a given line         ESC-v    Go back 5 lines
    ESC-y    Like ^Y, but for previous ^K

There are also parallel commands which operate on words, defined as whitespace
delimited strings:
    ESC-b    Go back one word		ESC-d (^W) Delete to end of word
    ESC-f    Go forward one word        ESC-h    Delete to start of word
    ESC-u    Restore last word deleted (actually until a space is restored)

   Any other character is inserted before the cursor (unless overwrite
has been set with ^T ). The arrow keys are equivalent to ^B, ^F, ^N,
and ^P. If you define the variable "remember_history_line" to be 1,
then ^N and ^P are relative to the last command that you retrieved.

   See also KEY for binding keys to commands.

   When editing a macro ("MACRO EDIT name", or "ed name"), ^N gives
the next line, ^P gives the previous line, ^V gives the next line but
4, and ESC-v gives the previous line but 4. ^M adds a line after the
current line, ^O adds a line before the current line, and ^X exits
from the editor.
