--- freem/doc/freem.texi 2025/05/18 18:15:38 1.58 +++ freem/doc/freem.texi 2025/05/18 20:40:35 1.59 @@ -2106,6 +2106,7 @@ Identical to @ref{$TRANSLATE()}, except * ZASSERT:: Raise error when a conditional expression evaluates @emph{false}. * ZBREAK:: Enable/disable ZBREAK mode. * ZCONST:: Define a constant that cannot be altered after initial definition. +* ZEDIT:: Edit a routine using an external editor. * ZGOTO:: @code{GOTO} with @code{BREAK} control. * ZHALT:: Exit FreeM job with return value. * ZINSERT:: Insert code into routine buffer. @@ -3449,6 +3450,37 @@ Constants must only be locals, and globa @code{ZCONST@emph{:postcondition} @emph{mref1}=@emph{initial-value1},...,@emph{mrefN}=@emph{initial-valueN}} @end example +@node ZEDIT +@section ZEDIT +@cindex ZEDIT +@cindex commands, ZEDIT +@cindex commands, non-standard +@emph{FreeM Extension} + +Edits a routine using an external editor. Uses environment variable @code{$EDITOR} if defined; otherwise, uses @code{vi}. + +@emph{Syntax} + +@example +ZEDIT@emph{[:postcondition]} +@end example + +In its argumentless form, edits the currently-active routine, provided the optional @emph{postcondition} is @emph{true} or omitted. + +@emph{Syntax} + +@example +ZEDIT@emph{[:postcondition]} @emph{} +@end example + +In its single-argument form, edits @emph{}, provided the optional @emph{postcondition} is @emph{true} or omitted. + +Routine names must not be quoted, and must not included a leading caret (@code{^}). + +@emph{Errors} + +@code{ZEDIT} will raise @code{ZNOPGM} if the routine cannot be found, or there is no routine currently loaded in argumentless form. + @node ZGOTO @section ZGOTO @cindex ZGOTO @@ -3457,7 +3489,7 @@ Constants must only be locals, and globa @cindex commands, non-standard @emph{FreeM Extension} -In its argumented form, enables @code{BREAK} mode and branches unconditionally to @emph{entryref}. +In its single-argument form, enables @code{BREAK} mode and branches unconditionally to @emph{entryref}. @emph{Syntax} @@ -3465,7 +3497,7 @@ In its argumented form, enables @code{BR ZGOTO @emph{entryref} @end example -In its argumented form, resumes execution after a @code{BREAK}. +In its argumentless form, resumes execution after a @code{BREAK}. @emph{Syntax}