Alan Bawden wrote:
> > I have a file "instll teco" with a TECO macro, and another file "pdp10 gtout"
> > which is data. The macro needs to run when the data file is in the buffer.
>
> If I only needed to do this once, I would just do it all from inside EMACS.
> If I had to do it with some regularity, I would just define the macro as a
> command in my personal EMACS environment.
This is part of building Alan Snyder's C compiler. The machine description
is processed to generate PDP10 GTOUT. Snippets of this file is distributed
to the compiler source files using the TECO code. This is done very rarely
manually, if ever. I have an automated script to build the compiler, so
this is the context in which the macro is used.
The interactions the script does with TECO to load the macro, save it, load
the data, and call the macro is about the same as doing it with EMACS.
I wonder, though, if there's maybe some way have the data in the buffer and
then M(...get macro file as string...). Can't you read from a file directly
to a q-reg? I haven't found anything in TECMAN or TECORD.
One minor improvement. I see HXx HK can be written shorter as HFXx. But
then, Y deletes the previous buffer contents, so there's no need for K.
ERpdp10 gtout$ @Y HXx ERinstll teco$ @Y Mx$$