roger@mips.UUCP (Roger March) (08/24/86)
*** If you can read this message, your line eater is broken *** The following is the 'emacs.mss' file from the recent microEmacs 3.7 posting converted to a form TROFF/NROFF-able with the '-me' macros (yes, I'm one of those). It is in SHAR form and produces the file 'emacs.me' when unSHARed. To get useful output: tbl emacs.me | troff -me Only formatting changes should have been made to the file. Bye, and thanks to the original authors. Rogue Monster -------- cut -------- cut -------- cut -------- cut -------- cut -------- #! /bin/sh # To extract, remove mail header lines and type "sh filename" echo x - emacs.me sed -e 's/^X//' > emacs.me << '!FaR!OuT!' X\" $Header$ X.ll 6.5i X.lt 6.5i X.po .8i X.nr si .4i X.nr so -.2i X.nr ps 0 X.nr $d 1 1 X.de ST X.sx \\$1 X.uh "\\$2" X.(x c X.sx \\$1 X.uh "\\$2" X.)x X.. X.de XC X.bp X.sx 0 X.br X.xp c X.. X.de (Z X.(z \\$1 \\$2 X.. X.de )Z X.)z X.nr $d +1 X.. X.de (B X.(b \\$1 \\$2 X.. X.de )B X.)b X.nr $d +1 X.. X.de (F X.(f X.ft B X.. X.de )F X.ft P X.)f \\$1 X.. X.de (T X.nr $T \\n($0 X.sx 0 X.. X.de )T X.nr $d +1 X.sx \\n($T X.. X.de RG X.sp X.i "\\$1" X\h'2i-\w'\\$1'u' X\\$2 X.sp .5 X.pp X.. X.he '''\*(td' X.fo ''Page %'' X.sh _ X.(b C X.sz +10 XMicroEMACS 3.7 X.sp X.sz -10 XScreen Editor X.sp .5 Xwritten by Dave Conroy Xand Daniel Lawrence X.sp .5i X.(q XThis software is in the public domain and may be freely copied Xand used by one and all. We would ask that if it is incorporated into Xother software that proper credit be given to its authors. X.)q X.)b X.ST 1 "Introduction" X.sp X.pp XMicroEMACS 3.7 is a screen editor for programming and word Xprocessing. It is availible for the IBM-PC and its clones, UNIX V7, XUNIX BSD4.2, UNIX V5, VMS, the HP150, the Wang-PC and the Commodore XAMIGA. It requires between 40 to 70K of space to run on these machines. XSome of its capabilities include: X.(b XMultiple windows on screen at one time X.sp .5 XMultiple files in the editor at once X.sp .5 XLimited on screen formating of text X.sp .5 XUser changable command set X.sp .5 XUser written editing macroes X.sp .5 XCompatability across all supported environments X.)b XThis manual is designed as a reference manual. All the commands Xin MicroEMACS are listed, in functional groups, along with detailed Xdescriptions of what each commands does. X.ST 1 "How to Start" X.sp X.pp XMicroEMACS is invoked from the operating system command level Xwith a command of the form: X.(b Xemacs {options} <filelist> X.sp .5 Xwhere options may be: X.TS Xtab(;); Xl lw(3i). X-v;all the following files are in view mode (read only) X-e;all the following files can be edited X-g<n>;go directly to line <n> of the first file X-s<string>;T{ Xgo to the end of the first occurance of <string> in the first file XT} X@@<sfile>;T{ Xexecute macro file <sfile> instead of the standard startup file XT} X.TE Xand <filelist> is a list of files to be edited. X.)b Xfor example: X.(b Xemacs @@start1.cmd -g56 test.c -v head.h def.h X.)b Xmeans to first execute macro file start1.cmd instead of the Xstandard startup file, emacs.rc and then read in test.c, position the Xcursor to line 56, and be ready to read in files head.h and def.h in Xview (read-only) mode. In the simple case, MicroEMACS is usually run by Xtyping: X.(b Xemacs <file> X.)b Xwhere <file> is the name of the file to be edited. X.ST 1 "How to type in commands" X.sp X.pp XMost commands in MicroEMACS are a single keystroke, or a Xkeystroke preceded by a command prefix. Control commands appear in the Xdocumentation like ^A which means to depress the <Ctrl> key and while Xholding down it down, type the A character. Meta-commands appear as XM-A which means to strike the Meta key (<ESC> on most computers) and Xthen after realeasing it, type the A character. Control-X commands Xusually appear as ^X-A which means to hold down the control key and type Xthe X character then type the A character. Both meta commands and Xcontrol-x commands can be control characters as well, for example, X^X-^O (the delete-blank-lines command) means to hold down <Ctrl>, type XX, keep holding down <Ctrl> and type the O character. X.pp XMany commands in MicroEMACS can be executed a number of times. XIn order to make one command repeat many times, type Meta (<ESC>) Xfollowed by a number, and then the command. for example: X.(b XM 12 ^K X.)b Xwill delete 12 lines starting at the cursor and going down. XSometimes, the repeat count is used as an argument to the command as in Xthe set-tab command where the repeat count is used to set the spacing of Xthe tab stops. X.ST 1 "The Command List" X.sp X.pp XThe following is a list of all the commands in MicroEMACS. XListed is the command name, the default (normal) keystrokes used to Xinvoke it, and alternative keys for the IBM-PC, and a description of Xwhat the command does. X.ST 2 "MOVING THE CURSOR" X.RG "previous-page" "^Z <Pg Up>" XMove one screen towards the begining of the file. X.RG "next-page" "^V <Pg Dn>" XMove one screen towards the end of the file. X.RG "begining-of-file" "M-< <Home>" XPlace the cursor at the begining of the file. X.RG "end-of-file" "M-> <End>" XPlace the cursor at the end of the file. X.RG "forward-character" "^F (6 on the keypad)" XMove the cursor one character to the right. Go down to Xthe begining of the next line if the cursor was already at the Xend of the current line. X.RG "backward-character" "^B (4 on the keypad)" XMove the cursor one character to the left. Go to the Xend of the previous line if the cursor was at the begining of Xthe current line. X.RG "next-word" "M-F (^6 on the keypad)" XPlace the cursor at the begining of the next word. X.RG "previous-word" "M-B (^4 on the keypad)" XPlace the cursor at the begining of the previous word. X.RG "begining-of-line" "^A" XMove cursor to the begining of the current line. X.RG "end-of-line" "^E" XMove the cursor to the end of the current line. X.RG "next-line" "^N (2 on the keypad)" XMove the cursor down one line. X.RG "previous-line" "^P (8 on the keypad)" XMove the cursor up one line. X.RG "goto-line" "M-G" XGoto a specific line in the file. IE M 65 M-G would Xput the cursor on the 65th line of the current buffer. X.RG "next-paragraph" "M-N" XPut the cursor at the first end of paragraph after the cursor. X.RG "previous-paragraph" "M-P" XPut the cursor at the first begining of paragraph before the cursor. X.ST 2 "DELETING & INSERTING" X.RG "delete-previous-character" "^H <--" XDelete the character immedietly to the left of the Xcursor. If the cursor is at the begining of a line, this will Xjoin the current line on the end of the previous one. X.RG "delete-next-character" "^D <Del>" XDelete the character the cursor is on. If the cursor is Xat the end of a line, the next line is put at the end of the Xcurrent one. X.RG "delete-previous word" "M-^H M- <--" XDelete the word before the cursor. X.RG "delete-next-word" "M-^D" XDelete the word starting at the cursor. X.RG "kill-to-end-of-line" XWhen used with no argument, this command deletes all Xtext from the cursor to the end of a line. When used on a blank Xline, it deletes the blank line. When used with an argument, it Xdeletes the specified number of lines. X.RG "insert-space" "^C <Ins>" XInsert a space before the character the cursor is on. X.RG "newline" "<return>" XInsert a newline into the text, move the cursor down to the Xbegining of the next physical line, carrying any text that was after Xit with it. X.RG "newline-and-indent" "^J" XInsert a newline into the text, and indent the new line the Xsame as the previous line. X.RG "handle-tab" "^I -->" XWith no argument, move the cursor to the begining of the Xnext tab stop. With an argument of zero, use real tab Xcharacters when tabbing. With a non-zero argument, use spaces Xto tab every argument positions. X.RG "delete-blank-lines" "^X-^O" XDelete all the blank lines before and after the current cursor position. X.RG "kill-paragraph" "M-^W" XDelete the paragraph that the cursor is currently in. X.RG "kill-region" "^W" XDelete all the characters from the cursor to the mark set with Xthe set-mark command. X.RG "copy-region" XCopy all the characters between the cursor and the mark Xset with the set-mark command into the kill buffer (so they can Xlater be yanked elsewhere). X.RG "open-line" "^O" XInsert a newline at the cursor, but do not move the cursor. X.ST 2 "SEARCHING" X.RG "search-forward" "^S" XSearch for a string from the current cursor position to Xthe end of the file. The string is typed on on the bottom line of Xthe screen, and terminated with the <ESC> key. Special characters Xcan be typed in by preceeding them with a ^Q. A single ^Q Xindicates a null string. On successive searches, hitting <ESC> Xalone causes the last search string to be reused. X.RG "search-reverse" "^R" XThis command searches backwards in the file. In all other ways Xit is like search-forward. X.RG "incremental-search" "^X-S" XThis command is similar to forward-search, but it processes the Xsearch as each character of the input string is typed in. This allows Xthe user to only use as many keystrokes as are needed to uniquely Xspecify the string being searched. Several control characters are active Xwhile isearching: X.(b X.TS Xtab(;); Xl lw(3i). X^S or ^X;Skip to the next occurence of the current string X^R;skip to the last occurence of the current string X^H;T{ Xback up to the last match (posibly deleting the last character on Xthe search string) XT} X^G;abort the search, return to start X<ESC>;end the search, stay here X.TE X.)b X.RG "reverse-incremental-search" "^X-R" XThis command is the same as incremental-search, but it starts in Xthe reverse direction. X.RG "hunt-forward" "unbound (<ALT>S on the IBM PC)" XThis command repeats the last search with the last search string X.RG "hunt-backward" "unbound (<ALT>R on the IBM PC)" XThe last search string is looked for starting at the cursor and Xgoing backwards. X.ST 2 "REPLACING" X.RG "replace-string" "M-R" XThis command allows you to replace all occurences of one string Xwith another string. The replacement starts at the current location of Xthe cursor and goes to the end of the current buffer. A numeric argument Xwill limit the number of strings replaced. X.RG "query-replace-string" "M-^R" XLike the replace-string command, this command will replace one Xstring with another. However, it allows you to step through each string Xand ask you if you wish to make the replacement. When the computer asks Xif you wish to make the replacement, the following answers are allowed: X.(b X.TS Xtab(;); Xc lw(3i). XY;Make the replacement and continue on to the next string XN;Don't make the replacement, then continue X !;Replace the rest of the strings without asking X^G;Stop the command X .;Go back to place the command started X ?;Get a list of options X.TE X.)b X.ST 2 "CAPITALIZING & TRANSPOSING" X.RG "case-word-upper" "M-U" XChange the following word into upper case. X.RG "case-word-capitalize" "M-C" XCapitolize the following word. X.RG "case-word-lower" "M-L" XChange the following word to lower case. X.RG "case-region-upper" "^X-^U" XChange all the alphabetic characters in a marked region to upper case. X.RG "case-region-lower" "^X-^L" XChange all the alphabetic characters in a marked region to lower case. X.RG "transpose-characters" "^T" XSwap the last and second last characters behind the cursor. X.RG "quote-character" "^Q" XInsert the next typed character, ignoring the fact that it may Xbe a command character. X.ST 2 "REGIONS & THE KILL BUFFER" X.RG "set-mark" "M-<SPACE>" XThis command is used to delimit the begining of a marked region. XMany commands are effective for a region of text. A region is defined Xas the text between the mark and the current cursor position. To delete Xa section of text, for example, one moves the cursor to the begining of Xthe text to be deleted, issues the set-mark command by typing M-<SPACE>, Xmoves the cursor to the end of the text to be deleted, and then deletes Xit by using the kill-region (^W) command. Only one mark can be set in Xone window or one buffer at a time, and MicroEMACS will try to remember Xa mark set in an offscreen buffer when it is called back on screen. X.RG "exchange-point-and-mark" "^X-^X" XThis command moves the cursor to the current marked position in Xthe current window and moves the mark to where the cursor was. This is Xvery usefull in finding where a mark was, or in returning to a position Xpreviously marked. X.ST 2 "COPYING AND MOVING" X.RG "kill-region" "^W" XThis command is used to copy the current region (as defined by Xthe current mark and the cursor) into the kill buffer. X.RG "yank" "^Y" XThis copies the contents of the kill buffer into the text at the Xcurrent cursor position. This does not clear the kill buffer, and thus Xmay be used to make multiple copies of a section of text. X.RG "copy-region" "M-W" XThis command copies the contents of the current region into the Xkill buffer without deleting it from the current buffer. X.ST 2 "MODES OF OPERATION" X.RG "add-mode" "^X-M" XAdd a mode to the current buffer X.RG "delete-mode" "^X-^M" XDelete a mode from the current buffer X.RG "add-global-mode" "M-M" XAdd a mode to the global modes which get inherited by any new Xbuffers that are created while editing. X.RG "delete-global-mode" "M-^M" XDelete a mode from the global mode list. This mode list is Xdisplayed as the first line in the output produced by the list-buffers Xcommand. X.ST 3 "MODES" X.sp X.pp XModes are assigned to all buffers that exist during an editing Xsession. These modes effect the way text is inserted, and the operation Xof some commands. Legal modes are: X.RG "OVER" "Overwrite Mode" XIn this mode, typed characters replace existing characters Xrather than being inserted into existing lines. Newlines still insert Xthemselves, but all other characters will write over existing characters Xon the current line being edited. This mode is very usefull for editing Xcharts, figures, and tables. X.RG "WRAP" "Word Wrap Mode" XIn this mode, when the cursor crosses the current fill column X(which defaults to 72) it will, at the next wordbreak, automatically Xinsert a newline, dragging the last word down with it. This makes Xtyping prose much easier since the newline (<RETURN>) only needs to be Xused between paragraphs. X.RG "VIEW" "File Viewing Mode" XIn this mode, no commands which can change the text are allowed. X.RG "CMODE" "C Program Editing Mode" XThis mode is for editing programs written in the 'C' programming Xlanguage. When the newline is used, the editor will attempt to place Xthe cursor at the proper indentation level on the next line. Close Xbraces are automatically undented for the user, and also pre-processor Xcommands are automatically set flush with the left margin. When a close Xparenthesis or brace is typed, if the matching open is on screen, the Xcursor briefly moves to it, and then back. (Typing any key will abort Xthis fence matching, executing the next command immediatly) X.RG "EXACT" "Exact Case Matching on Searching MODE" XNormally case is insignificant during the various search Xcommands. This forces all matching to take character case into account. X.RG "MAGIC" "Regular expresion pattern matching Mode" XThis feature is not yet implimented. While it may be set as a Xmode, it will have no effect at the moment. When it is ready, it will Xcause all search commands to accept various pattern characters to allow Xregular exspression search and replaces. X.ST 2 "ON-SCREEN FORMATTING" X.RG "set-fill-column" "^X-F" XSets the column used by WRAP mode and the fill-paragraph command. X.RG "handle-tab" "Mn-<TAB>" XGiven a numeric argument, the tab key resets the normal behavior Xof the tab key. An argument of zero causes the tab key to generate Xhardware tabs (at each 8 columns). A non-zero argument will cause the Xtab key to generate enough spaces to reach a culumn of a multiple of the Xargument given. This also resets the spacing used while in CMODE. X.RG "fill-paragraph" "M-Q" XThis takes all the text in the current paragraph (as defined by Xsurrounding blank lines, or a leading indent) and attempt to fill it Xfrom the left margin to the current fill column. X.RG "buffer-position" "^X-=" XThis command reports on the current and total lines and Xcharacters of the current buffer. It also gives the hexidecimal code of Xthe character currently under the cursor. X.ST 2 "MULTIPLE WINDOWS" X.RG "split-current-window" "^X-2" XIf possible, this command splits the current window into two Xnear equal windows, each displaying the buffer displayed by the original Xwindow. A numeric argument of 1 forces the upper window to be the new Xcurrent window, and an argument of 2 forces the lower window to be the Xnew current window. X.RG "delete-window" "^X-0" Xthis command attempts to delete the current window, retrieving Xthe lines for use in the window above or below it. X.RG "delete-other-windows" "^X-1" XAll other windows are deleted by this command. The current Xwindow becomes the only window, using the entire availible screen. X.RG "next-window" "^X-O" XMake the next window down the current window. With an argument, Xthis makes the nth window from the top current. X.RG "previous-window" "^X-P" XMake the next window up the current window. With an argument, Xthis makes tghe nth window from the bottom the current window. X.RG "scroll-next-down" "M-^V" XScroll the next window down a page. X.RG "scroll-next-up" "M-^Z" XScroll the next window up a page. X.ST 2 "CONTROLLING WINDOWS" X.RG "grow-window" "^X-^" XEnlarge the current window by the argument number of lines (1 by default). X.RG "shrink-window" "^X-^Z" XShrink the current window by the argument number of lines (1 by default). X.RG "resize-window" "^X-W" XChange the size of the current window to the number of lines Xspecified by the argument, if possible. X.RG "move-window-down" "^X-^N" XMove the window into the current buffer down by one line. X.RG "move-window-up" "^X-^P" XMove the window into the current buffer up by one line. X.RG "redraw-display" "M-^L" XRedraw the current window with the current line in the middle of Xthe window, of with an argument, with the current line on the nth line Xof the current window. X.RG "clear-and-redraw" "^L" XClear the screen and redraw the entire display. Usefull on Xtimesharing systems where messages and other things can garbage the display. X.ST 2 "MULTIPLE BUFFERS" X.RG "select-buffer" "^X-B" XSwitch to using another buffer in the current window. MicroEMACS Xwill prompt you for the name of the buffer to use. X.RG "next-buffer" "^X-X" XSwitch to using the next buffer in the buffer list in the Xcurrent window. X.RG "name-buffer" "M-^N" XChange the name of the current buffer. X.RG "kill-buffer" "^X-K" XDispose of an undisplayed buffer in the editor and reclaim the Xspace. This does not delete the file the buffer was read from. X.RG "list-buffers" "^X-^B" XSplit the current window and in one half bring up a list of all Xthe buffers currently existing in the editor. The active modes, change Xflag, and active flag for each buffer is also displayed. (The change Xflag is an * if the buffer has been changed and not written out. the Xactive flag is not an * if the file had been specified on the command Xline, but has not been read in yet since nothing has switched to that Xbuffer.) X.ST 2 "READING FROM DISK" X.RG "find-file" "^X-^F" XFInd the named file. If it is already in a buffer, make that Xbuffer active in the current window, otherwise attemt tocreate a new Xbuffer and read the file into it. X.RG "read-file" "^X-^R" XRead the named file into the current buffer (overwriting the Xprevious contents of the current buffer. If the change flag is set, a Xconfirmation will be asked). X.RG "insert-file" "^X-^I" XInsert the named file into the current position of the current buffer. X.RG "view-file" "^X-^V" XLike find-file, this command either finds the file in a buffer, Xor creates a new buffer and reads the file in. In addition, this leaves Xthat buffer in VIEW mode. X.ST 2 "SAVING TO DISK" X.RG "save-file" "^X-^S" XIf the contents of the current buffer have been changed, write Xit back to the file it was read from. X.RG "write-file" "^X-^W" XWrite the contents of the current file to the named file, this Xalso changed the file name associated with the current buffer to the new Xfile name. X.RG "change-file-name" "^X-N" XChange the name associated with the current buffer to the file Xname given. X.RG "quick-exit" "M-Z" XWrite out all changed buffers to the files they were read from Xand exit the editor. X.ST 2 "ACCESSING THE OPERATING SYSTEM" X.RG "shell-command" "^X-!" XSend one command to execute to the operating system command Xprocessor, or shell. Upon completion, MicroEMACS will wait for a Xkeystroke to redraw the screen. X.RG "pipe-command" "^X-@" XExecute one operating system command and pipe the resulting Xoutput into a buffer by the name of "command". X.RG "filter-buffer" "^X-#" XExecute one operating system command, using the contents of the Xcurrent buffer as input, and sending the results back to the same Xbuffer, replacing the original text. X.RG "i-shell" "^X-C" XPush up to a new command processor or shell. Upon exiting the Xshell, MicroEMACS will redraw its screen and continue editing. X.RG "suspend-emacs" "^X-D [only under BSD4.2]" XThis command suspends the editing processor and puts it into the Xbackground. The "fg" command will restart MicroEMACS. X.RG "exit-emacs" "^X-^C" XExit MicroEMACS back to the operating system. If there are any Xunwritten, changed buffers, the editor will promt to discard changes. X.ST 2 "KEY BINDINGS AND COMMANDS" X.RG "bind-to-key" "M-K" XThis command takes one of the named commands and binds it to a Xkey. From then on, whenever that key is struck, the bound command is Xexecuted. X.RG "unbind-key" "M-^K" XThis unbinds a command from a key. X.RG "describe-key" "^X-?" XThis command will allow you to type a key and it will then Xreport the name of the command bound to that key. X.RG "execute-named-command" "M-X" XThis command will prompt you for the name of a command to Xexecute. Typing <SPACE> part way thought will tell the editor to Xattempt to complete the name on its own. If it then beeps, there is no Xsuch command to complete. X.RG "describe-bindings" "UNBOUND" XThis command splits the current window, and in one of the Xwindows makes a list of all the named commands, and the keys currently Xbound to them. X.ST 2 "COMMAND EXECUTION" X.sp X.pp XCommands can also be executed as command scripts. This allows Xcomands and their arguments to be stored in files and executed. The Xgeneral form of a command script line is: X.(b X<optional repeat count> {command-name} <optional arguments> X.)b X.RG "execute-command-line" "UNBOUND" XExecute a typed in script line. X.RG "execute-buffer" "UNBOUND" XExecutes script lines in the named buffer. If the buffer is off Xscreen and an error occurs during execution, the cursor will be left on Xthe line causing the error. X.RG "execute-file" "UNBOUND" XExecutes script lines from a file. This is the normal way to Xexecute a special script. X.RG "clear-message-line" "UNBOUND" XClears the message line during script execution. This is Xusefull so as not to leave a confusion message from the last commands Xin a script. X.RG "unmark-buffer" "UNBOUND" XRemove the change flag from the current buffer. This is very Xusefull in scripts where you are creating help windows, and don't want XMicroEMACS to complain about not saving them to a file. X.RG "insert-string" "UNBOUND" XInsert a string into the current buffer. This allows you to Xbuild up text within a buffer without reading it in from a file. Some Xspecial characters are allowd, as follows: X.(b X.TS Xtab(;); Xc l. X ~n;newline X ~t;tab X ~b;backspace X ~f;formfeed X.TE X.)b X.ST 2 "MACRO EXECUTION" X.sp X.pp XAlso availible is one keyboard macro, which allows you to record Xa number of commands as they are executed and play them back. X.RG "begin-macro" "^X (" XStart recording keyboard macro X.RG "end-macro" "^X )" XStop recording keyboard macro X.RG "execute-macro" "^X E" XExecute keyboard macro X.RG "store-macro" "UNBOUND" XThis command is used to store script lines in a hiffen buffer by Xthe name of "[Macro nn]" where <nn> is a number from 1 to 40 and Xcoresponds to the argument given this command. All script lines then Xencountered will be stored in this buffer rather than being executed. A Xscript line consisting of only "[end]" tells the editor that the macro Xis complete, and stops recording script lines in the buffer. X.RG "execute-macro-nn" "UNBOUND [shift-<F1> thru shift-<F10>]" XThis is the command to execute a script stored in one of the Xhidden macro buffers. On the IBM-PC the first ten of these are bound to Xshift-<F1> thru shift-<F10>. X.bp X.XC !FaR!OuT! exit -- -Roger March DISCLAIMER: <generic disclaimer & other disk mutilation devices> UUCP: {decvax,ucbvax,ihnp4}!decwrl\ hplabs!glacier!mips!roger DDD: 408-991-0220 USPS: MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086
charles@hp-pcd.UUCP (charles) (08/27/86)
> The following is the 'emacs.mss' file from the recent > microEmacs 3.7 posting converted to a form TROFF/NROFF-able > with the '-me' macros (yes, I'm one of those). > Rogue Monster If this conversion was done with a program, I would be delighted if you could post it. I am sure there are lots of people who would like to have such an animal. Charles Brown hplabs!hp-pcd!charles