[mod.computers.68k] Saving keyboard macros in uEmacs

RDROYA01@ULKYVX.BITNET.UUCP (06/11/86)

Hello again,

I just wanted to tell about the latest addition to the uEmacs I've been
working on.  I missed the ability to save keyboard macros, so I devised a
way to do that.  First you define a keyboard macro using the usual macro
commands.  Then you issue the extrct_macr() function.  This function opens a
pop-up window, like that for the buffer list, it "reads" the keyboard macro,
and assigns function declarations and names to the values.  For example, if
you want a macro that drops the "." out of the midst of current onto the
next line preserving the indent, the keyboard macro is CTRL|'E'
(end-of-line) and CTRL|'J' (indent subsequent same as this).  The extract
macro function prompts for a function name, opens a window, and writes to
it.  Here's the actual output:

mdnlin(f,n)
int f,n;
{
        if(!gotoeol(f, n))
                return(FALSE);
        if(!indent(f, n))
                return(FALSE);
        return(TRUE);
}

This can then be added to a macro file and compiled into the program.  I use
the function for proto-typing new commands and, eventually, so that other
users here can "write" their own compiled functions pretty easily.