.BG
.VE $Header: /usr3/s/current/s/.help/RCS/medit,v 1.2 83/12/30 19:30:42 rab Exp $
.FN medit
.TL
medit: Edit a Macro
.CS
medit(defin, pos)
.PP
.AG defin
dataset containing the macro to be edited.
Macros are datasets with names
beginning "mac.". If `defin' is omitted, the most recent previously
edited text is edited (this allows recovering if the edited macro
is rejected by the macro-definition process).
.AG pos
optional, data directory position on which edited macro is to be
saved; default 2.
.PP
`medit' invokes a text editor (default is `ed') on a copy of the macro text.
Use the editor to make whatever changes are desired in the macro.
Then write the macro, and exit from the editor (`w' and `q' in `ed').
The macro will automatically be re-processed through the
`define' function, and stored on the specified data directory.
.PP
The user can specify which editor should be invoked by setting a UNIX shell
variable prior to invoking S.  For example, the shell commands
`EDITOR=vi; export EDITOR'
will cause `medit' to use the `vi' screen editor rather than `ed'.
.EX
medit(mac.abc)  # edits macro `abc' and replaces it
.KW macros
.KW editing
.KW error
.WR
