home *** CD-ROM | disk | FTP | other *** search
- This is a version of mg with an ARexx port. Actually, there have been
- three major changes:
-
- * Macros can now be bound to keys, and multiple macros can exist.
- * The startup file format has changed, to allow the above to be
- done during startup.
- * An ARexx port has been added.
-
- All of these changes are interdependent. I haven't added them to the
- source in a very clean way; there are no new #define's to turn the
- ARexx port on or off. In addition, there are some things missing.
- Nonetheless, because of the demand I have seen for this, I am releasing
- it until I finish similar modifications to mg2a (which probably won't
- be for some time.) Also, the stuff may not compile with Lattice any
- more.
-
- To bind macros to keys, simply define your macro like you normally do,
- using ^X( and ^X) to bracket a set of commands and keystrokes. Then,
- do a $x 'global-set-key-macro' key, where key is the key you wish to
- define.
-
- The new startup file looks something like this (my personal example):
-
- $x 'global-set-key' ^h 'backward-delete-char'
- $x 'global-set-key' \127 'delete-char'
- $x 'global-set-key' ^C 'save-buffers-kill-emacs'
- ^X( ^X^S $x 'rexx' 'TeXify' ^X)
- $x 'global-set-key-macro' \f1
- ^X( $x 'rexx' 'ToError' ^X)
- $x 'global-set-key-macro' \f2
-
- As you can see, now you can put in any type of key you want. $ means
- escape. Single quotes enclose strings that are terminated with carriage
- returns, as in $x names and the like. Control characters are preceded
- by a carat. A backslash followed by a number in decimal means the key
- with that ASCII code; a backslash followed by f and a number means that
- function key; a backslash followed by almost any other character means
- that character. As you can see, I define and bind to function keys two
- macros. It was this capability that I needed to add and the main reason
- for my rewrite of the startup file stuff.
-
- For documentation on the ARexx port, see the file Source/readme.tgr.
- Just as example, though, here is a REXX macro corresponding to the
- `ToError' above, which puts me at the location of an error in AmigaTeX:
-
- /* Now we try to determine the error location */
- options failat 5
- address 'AmigaTeX' 'ErrorLoc'
- errorloc = getclip('AmigaTeX.ErrorLoc')
- if errorloc = "" then exit
- else parse var errorloc filename linenum charpos
- address 'mg' "^X^F '"||filename||"'"
- address 'mg' "$x 'goto-line' '"||linenum||"'"
- address 'mg' "^U "||charpos-1||" ^F"
- exit
-
- As you can see, the `mg' port gets messages like:
-
- ^X^F 'foobar.tex'
- $x 'goto-line' '20'
- ^U 12 ^F
-
- to move to character 12, line 20, in file foobar.tex. Simple, eh?
-
- For information on ARexx, contact William Hawes, Box 308, Maynard, MA 01754
- or call him at (617) 568-8695. (ARexx is not for those uncomfortable in
- the CLI.) For information on this mg, or AmigaTeX, or whatever, I can be
- reached at Tomas Rokicki, Box 2081, Stanford, CA 94309. My telephone is
- (415) 326-5312; you will probably have to leave a message. Enjoy!
-
- (Oh, I also set the default window to be a bordered, resizeable window;
- I hated that damn openwindow/closewindow/openwindow sequence whenever the
- old mg started up.)
-