Driving an Editor


(ed [message] [arguments])message defaults to 'OPEN
'OPEN [filename]pop-up the editor, handle commands
'SAFE ensure current buffer is saved
'CLEAR clear buffer
'NAME [new-value]&dotfill#dotfill; ⇒ name of buffer
'BUFFER [new-value]&dotfill#dotfill; ⇒ a list of strings
'POSITION [new-value]&dotfill#dotfill; ⇒ cursor position
'INSERT [new-value]&dotfill#dotfill;#F when in overwrite mode
'TAB [new-value]&dotfill#dotfill; ⇒ tab expansion width
'TABULIZE-MODE [new-value]&dotfill#dotfill;'COMPRESS, 'NORMAL or 'EXPAND
'SEPARATORS [new-value]&dotfill#dotfill; ⇒ string (used for word move)
'CASE-SENSIVITY [new-value]&dotfill#dotfill;#F when disabled
'COLORS [new-value]&dotfill#dotfill; ⇒ associative color list
'COMMENT-COLUMN [new-value]&dotfill#dotfill; ⇒ column #
'INDENT-TOKENS [new-value]&dotfill#dotfill; ⇒ list of special tokens
'INPUT-PORT [new-value]&dotfill#dotfill; ⇒ port used for input
'DO-STRING stringfeed editor with keystrokes
'READ-ACTION &dotfill#dotfill; ⇒ an action: the next event
'HANDLE-ACTION actionprocess one command
'REMAP-KEY key function
$\textstyle \parbox{10cm}{\raggedright {\mediumseries\rm\it key}\/ is {\tt (list...
...s\ {\sc Ascii}$_2${\normalshape]}
{\mediumseries\rm\it {\sc Ascii}$_1$}\/)}}$
$\textstyle \parbox{10cm}{\raggedright {\mediumseries\rm\it function}\/ if {\tt ...
...xt action})} \ldots{\normalshape]}
{\mediumseries\rm\it default-action}\/)}}$
$\textstyle \parbox{10cm}{\raggedright {\mediumseries\rm\it context}\/ is $\lambda${\rm\normalshape ({\rm\it ed}\/)} $\longrightarrow$\ boolean}$
$\textstyle \parbox{10cm}{\raggedright {\mediumseries\rm\it action}\/ is a character, a string, or a symbol:}$
'@LEFT '@WORD-LEFT '@HOME '@RIGHT
'@WORD-RIGHT '@END '@UP '@PAGE-UP
'@TOP-OF-BUFFER '@DOWN '@PAGE-DOWN '@END-OF-BUFFER
'@DEL '@DELETE-TO-EOL '@DELETE-LINE '@BACKSPACE
'@TAB '@ENTER '@QUOTE  
'@INSERT-MODE '@GOTO-LINE '@REFRESH '@RECORD
'@PLAY '@EXECUTE '@LOAD '@READ-INTO
'@WRITE '@RENAME '@EXIT  
'@SEARCH '@REPEAT-SEARCH '@CASE-SENSITIVITY '@TRANSLATE
'@REPEAT-TRANSLATE '@REPLICATE '@BOOKMARK-[1...3] '@JUMP-TO-[1...3]
'@MARK-BLOCK '@LINE-BLOCK '@COLUMN-BLOCK '@CUT-BLOCK
'@COPY-BLOCK '@INSERT-BLOCK '@CANCEL-BLOCK '@SWAP-ANCHOR
'@MARK-EXPR '@MARK-DEF '@SCHEME-PARENTHESIS '@COMPLETION
'@INDENT '@COMMENT '@EVAL '@EVAL-BLOCK
'@SCHEME-ENTER