home *** CD-ROM | disk | FTP | other *** search
- First, a list of the modifications I had to make. I added
- the ability to bind a keyboard macro to a key, which makes
- it semi-permenant (instead of the typically temporary
- keyboard macros.) These macros can call other macros; this
- was essential for the next part. I have introduced a
- `command language' with which you can instruct mg, either
- in a startup file (default is s:.mg), by using the
- eval-expression extended macro, or by REXX. This command
- language is exactly what you would type to mg to get it
- to do what you have in mind, but in a format suitable for
- a text file.
-
- Here it comes. Control characters are represented by
- preceding them by a ^. The escape key is represented by
- $. Whitespace is ignored, except within strings. A string
- can either be delimited by "", or ''. The latter should
- only be used in anticipation of keyboard queries, as they
- get null terminated, which only makes sense to mg if it
- asked a question. Function keys are represented by
- \f1 through \f20 or some such. Backslash can escape any
- character, including itself. In addition, keys can be
- specified literally by using \ddd, in octal.
-
- For instance, to save the current buffer and then go back
- to the top of the file, you can type
-
- ^X^S $<
-
- or (using the extended named commands)
-
- $x 'save-buffer' $x 'beginning-of-buffer'
-
- which are idential (except the former takes a lot less macro
- space and executes more quickly.) You can even define
- keyboard macros, ala
-
- ^X( ^X^S $< ^X)
-
- which puts the above in the keyboard macro. Then, you can
- bind this macro into another key (this must be a separate
- command):
-
- $x 'global-set-key-macro' \f1
-
- to put it in f1, for instance. You might want to do something
- like the following, for using TeX and REXX and mg all together:
-
- ^X( $x 'rexx' 'texify' ^X)
- $x 'global-set-key-macro' \f2
-
- mg opens a port by the name of 'mg'. It uses REXX strictly
- as a server, so you shouldn't throw messages at it unless
- it asks you first. This is essential! In any case, there
- is a new extended command, rexx, which prompts for a command
- line and shoves the thing at REXX. Now, the rexx program which
- is invoked (which has a default extension of .mg) can send
- whatever commands it wants at mg. The keyboard is ignored
- during the rexx processing. Eventually things should come
- back, though.
-
- This is a list of extended commands supported by mg, and
- their normal keyboard equivalents.
-
- #auto-fill-mode
- Toggles word-wrap at fill-column, after space is typed.
- #!auto-indent-mode
- Toggles indenting to first whitespace after a newline.
- #backward-char [C-b]
- Move point left ARG characters (right if ARG negative).
- On reaching end of buffer, stop and signal error.
- #backward-delete-char [DEL]
- Delete characters backwards. Delete ARG chars, and save in
- kill buffer if ARG was specified
- #backward-kill-word [ESC DEL]
- Kill characters backward until encountering the end of a word.
- With argument, do this that many times.
- #backward-paragraph [ESC [ ]
- Move backward to start of paragraph. With arg, do it arg times.
- #backward-word [ESC b]
- Move backward until encountering the end of a word.
- With argument, do this that many times.
- #beginning-of-buffer [ESC < ]
- Move point to the beginning of the buffer; leave mark at
- previous position.
- #beginning-of-line [C-a]
- Move point to beginning of current line.
- #bsmap-mode
- Toggles a mode that maps ^H to del and del to ^H, where the
- editor can't see it.
- #call-last-kbd-macro [C-x e]
- Call the last keyboard macro that you defined with C-x (.
- #capitalize-word [ESC c]
- Convert following word (or ARG words) to upper case, moving over.
- #copy-region-as-kill [ESC w]
- Save the region as if killed, but don't kill it.
- #ctrlx-four-hack
- Exists to support the Ctl-x 4 <things> code.
- #delete-blank-lines [C-x C-o]
- On blank line, delete all surrounding blank lines, leaving just one.
- #delete-char [C-d]
- Delete the following ARG characters (previous, with negative arg).
- If ARG is specified, appends deleted characters to the kill buffer.
- #delete-horizontal-space [ESC \]
- Delete all spaces and tabs around point.
- #delete-other-windows [C-x 1]
- Make current window fill the screen.
- #delete-window [C-x 0]
- Remove current window from the display.
- #describe-bindings [C-h b]
- Show a list of all defined keys, and their definitions.
- The list is put in a buffer, which is displayed.
- #describe-key-briefly [C-h c]
- Print the name of the function KEY invokes.
- #downcase-region [C-x C-l]
- Convert the region to lower case.
- #downcase-word [ESC l]
- Convert following word (or ARG words) to lower case, moving over.
- #emacs-version
- Print string describing the version of Emacs that is running.
- #end-kbd-macro [C-x ) ]
- Finish defining a keyboard macro.
- The definition was started by C-x (.
- The macro is now available for use via C-x e,
- #end-of-buffer [ESC > ]
- Move point to the end of the buffer; leave mark at previous position.
- #end-of-line [C-e]
- Move point to end of current line.
- #enlarge-window [C-x ^]
- Make current window ARG lines bigger.
- #eval-current-buffer
- Execute the current buffer as an Emacs command file.
- #eval-expression
- Get Emacs command and evaluate.
- #exchange-point-and-mark [C-x C-x]
- Put the mark where point is now, and point where the mark is now.
- #execute-extended-command
- Read function name, then read its arguments and call it.
- #fill-paragraph [ESC q]
- Fill paragraph at or after point.
- #find-file [C-x C-f]
- Edit file FILENAME.
- Switch to a buffer visiting file FILENAME,
- creating one if none already exists.
- #find-file-other-window [C-x 4 f] [C-x 4 C-f]
- Edit file FILENAME, in another window.
- May create a new window, or reuse an existing one;
- #flow-mode
- Toggles a mode that maps ^\ to ^S and ^^ to ^Q and silently
- eats ^S and ^Q at a level where the editor can't see it.
- #forward-char [C-f]
- Move point right ARG characters (left if ARG negative).
- On reaching end of buffer, stop and signal error.
- #forward-paragraph [ESC ] ]
- Move forward to end of paragraph. With arg, do it arg times.
- #forward-word [ESC f]
- Move point forward ARG words (backward if ARG is negative).
- #global-set-key
- Give KEY a definition of COMMAND.
- #global-set-key-macro
- Binds KEY to a copy of the current keyboard macro.
- #global-unset-key
- Remove global definition of KEY.
- #goto-line
- goto LINE in the current buffer.
- #help [C-h]
- Prompt user to find out what kind of help to supply
- #insert-file [C-x i]
- Insert contents of file FILENAME into buffer after point.
- Set mark after the inserted text.
- #insert-newline [RET]
- Bound to newline so that it does the right things. Usually
- ignorable.
- #insert-with-wrap
- Bound to space in auto-fill-mode. Check current column, and adds
- a newline if past it.
- #isearch-backward [C-r]
- Do incremental search backward.
- See isearch-forward for more information.
- #isearch-forward [C-s]
- Do incremental search forward.
- As you type characters, they add to the search string and are found.
- Type Delete to cancel characters from end of search string.
- Type ESC to exit, leaving point at location found.
- Type C-S to search again forward, C-R to search again backward.
- Type C-Q to quote control character to search for it.
- C-G while searching or when search has failed
- cancels input back to what has been found successfully.
- C-G when search is successful aborts and moves point to starting point.
- Other control and meta characters terminate the search
- and are then executed normally.
- #just-one-space [ESC SPC]
- #keyboard-quit [C-g]
- Terminate the current function with an quit condition.
- #kill-buffer [C-x k]
- Get rid of the specified buffer.
- #kill-line [C-k]
- Kill the rest of the current line; before a newline, kill the newline.
- With prefix argument, kill that many lines from point.
- Negative arguments kill lines backward.
- #kill-paragraph
- Kill current paragraph.
- #kill-region [C-w]
- Kill between point and mark.
- The text is deleted but saved in the kill buffer.
- The command C-y can retrieve it from there.
- #kill-word [ESC d]
- Kill characters forward until encountering the end of a word.
- With argument, do this that many times.
- #list-buffers
- Display a list of names of existing buffers.
- Inserts it in buffer *Buffer List* and displays that.
- #load
- Execute a file of Emacs commands.
- #newline-and-indent [C-j]
- Insert a newline, then indent.
- #next-line [C-n]
- Move cursor vertically down ARG lines.
- #next-window
- Move to the next window down the screen.
- #no-tab-mode
- Toggles a mode that treat tabs like most other control characters,
- and rebinds tab to space-to-tabstop.
- #not-modified [ESC ~]
- Clear buffer modified flag.
- #open-line [C-o]
- Insert a newline and leave point before it.
- With arg, inserts that many newlines.
- #post-line
- Put the current line in the REXX cliplist under the variables
- "mg.DotLine" and "mg.DotPos".
- #prefix-region
- Prepend a string (set by set-prefix-string) to each line
- in the curernt region. If given an argument, prompts
- you for the string to use.
- #previous-line [C-p]
- Move cursor vertically up ARG lines.
- #previous-window
- Move to the next window up the screen.
- #query-replace [ESC % ]
- Replace some occurrences of FROM-STRING with TO-STRING.
- As each match is found, the user must type a character saying
- what to do with it.
- Type Help char within query-replace for directions.
- #quoted-insert [C-q]
- Read next input character and insert it.
- Useful for inserting control characters.
- #recenter [C-l]
- Center point in window and redisplay screen. With ARG, put point
- on line ARG. The desired position of point is always relative
- to the current window. Also forces full screen refresh.
- #rexx
- Sends a command to rexx. Default extension is .mg.
- #save-buffer [C-x C-s]
- Save current buffer in visited file.
- #save-buffers-kill-emacs [C-x C-c]
- Offer to save each buffer, then kill this Emacs.
- #save-some-buffers [C-x s]
- Save some modified file-visiting buffers. Asks user about each one.
- With argument, saves all with no questions.
- #scroll-down [ESC v]
- Scroll text of current window downward ARG lines; or near full
- screen if no ARG.
- #scroll-other-window [ESC C-v]
- Scroll text of next window upward ARG lines; or near full screen
- if no ARG. The next window is the one below the current one; or
- the one at the top if the current one is at the bottom.
- #scroll-up [C-v]
- Scroll text of current window upward ARG lines; or near full
- screen if no ARG.
- #search-again
- Handy to have around for function keys/menus, etc.
- #search-backward [ESC r]
- Search backward from point for STRING.
- #search-forward [ESC s]
- Search forward from point for STRING.
- see search-backward
- #self-insert-command [All printing characters and tab]
- Insert this character.
- #set-fill-column [C-x f]
- Set fill-column to current column, or to argument if given.
- #set-mark-command [C-@]
- Set mark to where point is.
- #set-prefix-string
- Set string used by prefix-region to put in front of each line text.
- #shrink-window
- Make the current window ARG lines smaller.
- #space-to-tabstop
- Insert spaces to the next tabstop. With a positive argument,
- #split-window-vertically [C-x 2]
- Split current window into two windows, one above the other.
- #start-kbd-macro [C-x ( ]
- Record subsequent keyboard input, defining a keyboard macro.
- The commands are recorded even as they are executed.
- #suspend-emacs [C-z] [C-x C-z]
- Get a shell. Exactly what shell depends on the system you
- are on.
- #switch-to-buffer [C-x b]
- Select the specified buffer in the current window.
- #switch-to-buffer-other-window [C-x 4 b]
- Switch to specified buffer in another window.
- #transpose-chars [C-t]
- Interchange characters around point, moving forward one character.
- #upcase-region [C-x C-u]
- Convert the region to upper case.
- #upcase-word [ESC u]
- Convert the following word (or ARG words) to upper case, moving over.
- #what-cursor-position [C-x =]
- Print info on cursor position.
- #window-to-front
- Make the Emacs window come to the front
- #window-to-back
- Push the Emacs window back
- #write-file [C-x C-w]
- Write current buffer into file FILENAME. Makes FILENAME the file for
- the current buffer.
- #yank
- Reinsert the last stretch of killed text.
-
-
-
-
-