AEDIT -86 User's Guide Macro Commands
(
MEXEC)
is a configurabJe key (usually
(CTRL-E».
To
activate
the
single-
character
macro, press
(MEXEC)
followed by
the
macro name.
For
example,
if
you
are
using
the
macros
from
USEFUL.MAC
in
INSERT
mode,
typing
(
MEXEC)
t converts
the
word
that
starts
"under"
the cursor to uppercase letters.
A digit
may
not be used as a single-character macro at main
command
level because
it
is
always interpreted
as
a count. A function key
may
not be used as a
macro
name
because the key's function overrides the macro definition.
The following
is
an example to demonstrate using a single-character
macro
in
INSERT
or
XCHANGE
mode. You can define a macro called
(CTRL-P)
as the
word
PROCEDURE
and
save this
macro
in a file called
PLM.MAC.
If
you
are
editing a
Pl/M
source file, you
can
call
PLM.MAC
with
MACRO
Get: then, each
time you type
<
CTRl-P)
the word
PROCEDURE
will be inserted into the file.
This saves having to type out
the
word each time you want
to
insert it.
Errors
• "illegal
command"
is displayed when you type a
character
that
is
not a command
abbreviation, a decimal digit, or a macro name, at main command level.
• ··no such macro"
is
displayed if the character following the
EXECUTE
command
or
the <
MEXEC)
key
is
not a macro name; i.e., no macro with
that
name
exists.
5.7
Macro Files
A macro file
may
consist
of
the
following:
• Configuration commands
•
SET
commands
•
Macro
definitions
•
Macro
comments
Configuration commands specify the
host/terminal
characteristics (described
in
Chapter
9).
SET
commands
are
the
only
commands,
with
the
exception
of
configuration
commands,
that
can be specified
in
a macro file. Including
SET
commands allows
you to specify the mode
of
operation.
For
example,
if
you use a macro called
AEDIT.MAC
to
"set"
your environment, you
may
include the command
SET
K_token Yes
if
you want the environment initialized to search for tokens only. In the
macro file, this command appears as
SKY.
A macro definition
is
a series
of
commands written
in
macro form. It has the follow-
ing format:
where
M
macro_name
\BR
declares
that
a macro definition follows.
is
any name given to the macro being defined.
stands for
<
ESC).
characters_in_macro
is
the
macro contents.
\MM
\EM
signals the end
of
a modeless macro.
signals the end of a non-modeJess macro.
5-7