klotz@ihlpm.ATT.COM (Dave Klotzbach) (05/24/89)
# This is a shell archive. Remove anything before this line, then feed it # into a shell via "sh file" or similar. To overwrite existing files, # type "sh file -c". # The tool that generated this appeared in the comp.sources.unix newsgroup; # send mail to comp-sources-unix@uunet.uu.net if you want that tool. # If this archive is complete, you will see the following message at the end: # "End of archive 6 (of 6)." # Contents: medoc.p05 # Wrapped by klotz@ihlpm on Wed May 24 11:04:43 1989 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'medoc.p05' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'medoc.p05'\" else echo shar: Extracting \"'medoc.p05'\" \(17603 characters\) sed "s/^X//" >'medoc.p05' <<'END_OF_FILE' X.br X.ne 1.0i X.sp 2 X.SE "\fBIBM-PC/XT/AT and its clones\fB" X X X The IBM-PC family of computers is supported with a variety of Xdifferent display adapters. EMACS will attempt to discover what adapter Xis connected and use the proper driver for it. Below is a list of the Xcurrently supported video adapters: X X.nf X.ft CW X X.us "Adapter $sres Original mode used" X XMonochrome Graphics Adapter MONO MONO XColor Graphics Adapter CGA CGA XEnhanced Graphics Adapter EGA CGA XVideo Graphics Adapter VGA CGA\fR X.fi X X\fB X X If a driver for a Microsoft compatable mouse is installed on the Xsystem, EMACS will use the mouse in text mode and allow the user all the Xstandard mouse functions. The mouse cursor will appear to be a block of Xcolor in the color opposite of it's background. X X EMACS also takes advantage of various function keys and the keys Xon the keypad on an IBM-PC. The function keys are initially not bound Xto any particular functions (except by the emacs.rc startup file), but Xthe keypad keys do default to the following: X X.nf X.ft CW X X.us "Keypad key Function" X XHome beginning-of-file XCSRS UP previous-line XPg Up previous-page XCSRS LEFT backward-character XCSRS RIGHT forward-character XEnd end-of-file XCSRS DOWN next-line XPg Dn Next-page\fR X.fi X X\fB X X All these special keys are indicated in EMACS macroes by use of Xthe \fBFN\fB prefix. Below is a list of many of the keys and the codes Xused to specify them. Also the codes may be gotten by using the Xdescribe-key (^X ?) command on the suspect key. X X.ad l X\fBCompiling under TURBO C\fB X.na X X.nf X.ft CW X X X To compile MicroEMACS under TURBO C, set the TURBO integrated Xenvironment with the following options: X X Memory model LARGE X Floating point NONE X Default char type UNSIGNED X Data alignment BYTE X Merge duplicate strings ON X Standard stack frame off X Test stack overflow off X X Optimize for SIZE X Use register optimization ON X Register optimization ON X Jump optimization ON X X Initialize segments OFF X Stack warnings OFF X X Names: Code names X Segment name *\fR X.fi X X\fB X X.bp X.fi X X.br X.ne 1.0i X.sp 2 X.SE "\fBHP 150\fB" X X X This machine from Hewlett Packard is very unusual for an MSDOS Xmachine. It has a touch screen and is very function key oriented. An Xadditional command, \fIlabel-function-key allows you to place labels on the on screen function key labels. A Xnumeric argument indicates which function key to label (one through Xeight) and then the program prompts for a 16 character label, which will Xbe used as two lines of eight characters. To label function key three Xwith ``save file'' from a macro, you would use: X X.ft CW X3 label-function-key "save file"\fB X X X Notice the 4 spaces after ``save''. This forces ``file'' to begin on Xthe second line of the label. X.bp X.fi X X.br X.ne 1.0i X.sp 2 X.SE "\fBAtari 520/1040ST\fB" X X X The ATARI ST family of computers have a dual personality. They Xmay use either a monochrome or a color screen. EMACS supports two Xscreen resolutions on each monitor. X X.ce 1 X\fBNOTE\fB X X.in+0.5i X.ll-0.5i XWhen you set MicroEMACS up on your system, please remember to Xinstall it on the desktop as a GEM application. If you have EMACS set Xas a TOS application, the mouse will not function properly, and EMACS Xwill alert you to this problem by beeping the bell. X.in-0.5i X.ll+0.5i X X X.nf X.ft CW X X.us "Monitor $sres size #color $palette format" X XColor LOW 40x25 16 000111222333444555666777 X MEDIUM 80x25 4 000111222333 XMono HIGH 80x25 2 000 X DENSE 80x50 2 000\fR X.fi X X\fB X X The $palette environment variable can be used to change what Xcolor is associated with each color name. With a color monitor, each Xgroup of three digits indicates an octal number specifying the RED, XGREEN and BLUE levels of that color. Each color digit can vary from 0 Xto 7. For example, the initial setting of $palette in LOW resolution is: X X.nf X.ft CW X X 000700070770007707077777 X X which broken up is: X X 000 700 070 770 007 707 077 777 X X which means: X X 000 Black X 700 Red X 070 Green X 770 Yellow X 007 Blue X 707 Magenta X 077 Cyan X 777 White\fR X.fi X X\fB X X Also the mouse buttons are bound to mouse functions as Xdescribed in the chapter about mice. The cursor keys and the function Xkeys are bound similarly to IBM-PC. X X Files generated by EMACS on the ATARI ST have a single return Xcharacter at the end of each line, unlike the desktop files which want Xto have two returns. This makes it display files strangely from GEM's X[SHOW] option, but makes the files port to other computers much nicer. XWhen compiling MicroEMACS, the ADDCR symbol in \fBestruct.h\fB will cause Xemacs to generate line ending sequences compatible with GEM. X X Currently, when operating under the Mark Williams MSH program, XEMACS can shell out and perform external commands. This capability will Xbe added later for the Beckmeyer shell and under GEMDOS. X.bp X.fi X X.br X.ne 1.0i X.sp 2 X.SE "\fBAmiga 1000\fB" X X X The Commodore AMIGA 1000 version of MicroEMACS does fully Xsupport the mouse, window resizing and the close gadget. It runs in Xmedium resolution, using the colors defined for the workbench. X X.ce 1 XNote about Compiling MicroEMACS X X.ll -0.5i X.in +0.5i X X If you are compiling the sources on the AMIGA to produce an Xexecutable image, and you are using the Lattice compiler, be sure to Xgive the CLI command 'STACK 40000' before compiling to make sure the Xcompiler has sufficient stack space to successfully complete Xcompilation. X.ll +0.5i X.in -0.5i X X.bp X.fi X X.br X.ne 1.0i X.sp 2 X.SE "\fBUNIX V5, V7, and BSD4.[23]\fB" X X X MicroEMACS under UNIX utilizes the \fBTERMCAP\fB library to provide machine independent screen functions. Make sure that Xtermcap is available and properly set on your account before attempting Xto use MicroEMACS. X X Under systems which support job control, you can use the\fB^XD\fB \fIsuspend-emacs command to place EMACS Xinto the background. This carries a much smaller overhead than bringing Xup a new shell under EMACS. EMACS will properly redraw the screen when Xyou bring it back to the foreground. X X If the symbol VT100 has been set to 1 in the \fIestruct.h Xoptions file, EMACS will recognize the key sequence <ESC>[ as the lead Xin sequence for the FN function key prefix. X X With the addition of some very machine/operating system specific Xcode, EMACS can prevent two or more people from modifying the same file Xat the same time. The upper level of a set of Xfunctions to provide file locking exist in the source file \fBLOCK.C\fB. XIt requires two machine specific functions written and linked into EMACS Xfor it to operate properly. X X.nf X.ft CW X X char *dolock(fname) X X char *fname; X X dolock() locks a file, preventing others from modifying it. If X it succeeds, it returns NULL, otherwise it returns a pointer to X a string in the form "LOCK ERROR: explanation". X X char *undolock(fname) X X char *fname; X X undolock() unlocks a file, allowing others to modifying it. If X it succeeds, it returns NULL, otherwise it returns a pointer to X a string in the form "LOCK ERROR: explanation".\fR X.fi X X\fB X.bp X.fi X X.br X.ne 1.0i X.sp 2 X.SE "\fBDEC VMS operating system\fB" X X X.ad l X\fBTERMINALS\fB X.na X X X MicroEMACS uses the capabilities of VMS SMG, and should work Xwith any terminal that is defined in SMGTERMS.TXT or TERMTABLE.TXT. X(See your SMG manual for more information.) Full keyboard support, with Xfunction keys and everything, is provided for VT100 and VT200 series Xcompatible terminals. Mouse support is provided for the VSII Xworkstation's VT220 terminal emulator, and other terminal emulators Xthat use the same escape sequences for mouse control. (There is some Xpartial support for the BBN BitGraph mouse sequences in the sources, Xbut this is not yet complete.) Terminals may have up to 100 lines and X160 columns. X X.ad l X\fBKEYBOARD\fB X.na X X X The VMS version understands the LK201 functions of VT200 Xseries, vt300 series, and compatible terminals and terminal emulators, Xand allows you to bind to them as function keys. In addition, the XVT100 numeric keypad, in application mode, is available as function Xkeys. MicroEMACS does not, however, put the keypad into application Xmode for you. This is done by issuing the command ``SET TERM X/APPLICATION'' before entering MicroEMACS. X X.nf X.ft CW X X.us "VT200 keys" X X XF6 = FN^Q F7 = FN^R F8 = FN^S F9 = FN^T F10 = FN^U XF11 = FN^W F12 = FN^X F13 = FN^Y F14 = FN^Z HELP = FN^\\ XDO = FN^] F17 = FN^_ F18 = "FN " F19 = FN! F20 = FN" XFIND = FN^A INSERT = FN^B REMOVE = FN^C SELECT = FN^D PREV = FN^E XNEXT = FN^F X X.us "VT100 and VT200 Arrow keys" X X XUp = FNA Down = FNB Right = FNC Left = FND X X.us "VT100 and VT200 numeric keypad in SET TERM /APPLICATION mode" X X XPF1 = FNP9 PF2 = FNQ PF3 = FNR PF4 = FNS X7 = FNw 8 = FMx 9 = FNy - = FNm X4 = FNt 5 = FNu 6 = FNv , = FNl X1 = FNq 2 = FNr 3 = FNs ENTER = FNM X0 = FNp . = FNn\fR X.fi X X\fB X X.ce 1 X\fBWARNING\fB X X.ll -0.5i X.in +0.5i X X The VMS version contains code for interpreting function keys Xthat are sent as Ansi sequences that begin with the ESC character. XBecause of this, MicroEMACS cannot process an incoming ESC until it Xknows what character follows it. This can cause problems with Xterminating search and replace strings. If you use ESC as the Xmeta-prefix character (which is the default) you must type one Xadditional keystroke following ESC before emacs will recognize that you Xhave edited the search command prompt, and are continuing. (The Xadditional character is processed normally be MicroEMACS, it is NOT Xdiscarded.) X.ll +0.5i X.in -0.5i X X X.ad l X\fBFlow control\fB X.na X X X Some terminals will require the use of XON/XOFF flow control Xwhen used with MicroEMACS. When XON/XOFF flow control is used, you Xwill not be able to use functions bound to ^S or ^Q, and should use Xbind-to-key to put these functions on other keys. MicroEMACS does not Xchange the flow control characteristics of your terminal line while it Xis running. If your terminal requires flow control, you should: X X $ SET TERM/HOSTSYNC/TTSYNC X X before entering MicroEMACS. If you are on a VSII emulated Xworkstation terminal, are using the SSU multi-session protocol (VT330 Xand VT340 with SSU enabled), or are certain that your terminal does not Xrequire XON/XOFF flow control, you should X X $ SET TERM /HOSTSYNC/NOTTSYNC X X This will allow you to use ^S and ^Q for MicroEMACS commands. XNote that if you are using a VSII with VWS V3.2 or later, you must Xleave the /HOSTSYNC enabled in order for the cross/session cut and Xpaste capability to work properly. X X X.ad l X\fBSearch List for EMACS.RC\fB X.na X X X VMS MicroEMACS will first search logical name MICROEMACS$LIB:, Xand then ``sys$sysdevice:[vmstools]'' when looking for startup files or Xhelp files. X X Please use MICROEMACS$LIB:, and allow the secondary search of X[vmstools] to become archaic. If desired, MICROEMACS$LIB may be Xdefined to be a VMS search list that first searches a user directory, Xand then a system directory. X X Generally, you should create a private directory where you keep Xall your .CMD files, and in your LOGIN.COM $DEFINE a logical name to Xpoint to this area. X X.ad l X\fBUsing MicroEMACS with VMS MAIL and NOTES\fB X.na X X X There are two ways of using MicroEMACS with MAIL and NOTES. XThe first way requires the cooperation of your system manager, but is Xfaster and less taxing on system resources. The second way can be done Xby any random user that has PRCLM quota that is greater than 1, but it Xcreates a new subprocess each time MicroEMACS is called up from the Xapplication, and is therefore slower to invoke and more demanding on Xsystem resources. Obviously, the first way is recommended. X X.nf X.ft CW X X.us "First way" X X X1. $ SET PROC/PRIV=ALL X2. $ Copy MESHR.EXE SYS$SHARE:MESHR.EXE/PROT=WO:RE X3. $ INSTALL :== $INSTALL X4. $ INSTALL/COMMAND ADD SYS$SHARE:MESHR.EXE\fR X.fi X X\fB X X Step 4, and possibly step 3, must be incorporated into the Xsystem-wide startup command file, usually SYS$MANAGER:SYSTARTUP.COM, so Xthat MicroEMACS will be installed each time the system boots. Note Xthat the filename MUST be ``MESHR.EXE''. X X.ad l X5. $ DEFINE MAIL$EDIT CALLABLE_ME X.na X X X Step 5 must be added to the LOGIN.COM of each user that wishes Xto have MicroEMACS as their MAIL editor. Additionally, they may wish Xto have the line $ ME :== $SYS$SHARE:MESHR.EXE, which will allow them Xto use the ``ME'' command for invoking MicroEMACS from DCL. X X.ad l X6. $ NOTES X.na X X.ad l X NOTES> SET PROFILE/EDIT=(ME,CALL) X.na X X X Step 6 must be performed by each user that wishes to have XMicroEMACS as their NOTES editor. X XNOTE: If you already have a version of MicroEMACS installed, and you Xwish to install a new version in a running system, you must XREMOVE the old image and INSTALL the new one before MAIL or NOTES will Xrecognize it. To perform the upgrade, use following sequence of commands: X X.nf X.ft CW X X$ install :== $install X$ set proc /priv=all X$ install/command remove sys$share:meshr.exe X$ copy meshr.exe sys$share:/log/prot=wo:re X$ install/command add sys$share:meshr.exe\fR X.fi X X\fB X X.ad l X\fBSecond way\fB X.na X X X In the event that you cannot get your system manager to INSTALL XMicroEMACS as known image, you can use the following technique: X X.nf X.ft CW X X1. In MICROEMACS$LIB:MEMAIL.COM, put the following command file: X X$! Use on VAX/VMS as MAIL$EDIT for using MicroEMACS as mail editor. X$ if "''P1'" .NES. "_NL:" then if "''P1'" .NES. "" then copy 'P1' 'P2' X$ define/user sys$input sys$output X$ me 'P2' X$ exit X XThis file may have come with your MicroEMACS kit. X X2. In your LOGIN.COM, put the following lines: X X$ me :== $MICROEMACS$LIB:MESHR.EXE ! Assumes meshr.exe is there X$ define mail$edit microemacs$lib:me_edit.com X X3. In NOTES, give the command X XNOTES> SET PROFILE/EDIT=(@MicroEMACS$lib:me_edit.com,SPAWN) X X.ad l X\fBBuilding MicroEMACS for VMS\f(CW X.na X X XThe configuration options are set in file estruct.h: X X- Under the category of "Machine/OS definitions", set VMS to "1" and all Xothers to "0". X X- Under "Compiler definitions", set all selections to "0". Selecting XVMS implies that you are using VAXC. X X- Under "Special keyboard definitions", be sure "VT100" is set to "0". XThis option is not required for the VMS version, it is for versions Xlinked with ANSI terminal support. VMSVT already handles the special Xcharacteristics of Ansi keyboards. X X- Under "Terminal Output definitions", set VMSVT to "1" and all others Xto "0". X X- Under "Configuration options", you may select as you wish, with the Xfollowing notes: X X - COLOR support does not exist for VMS, even when using X color workstations. X - MOUSE support should be enabled if you have any VSII workstations\fR X.fi X X\fB X X If you have MMS, you can use the supplied DESCRIP.MMS to build XMicroEMACS. If you do not have MMS, simply compile each module with X``CC'', and link with the command: X X $ LINK MESHR/OPTION/SHARE X X Note that the executable filename must end in ``SHR'' in order Xfor MicroEMACS to be used as a callable editor from MAIL or NOTES. X(Method 1 above.) X X If you edit any of the Emacs sources, note that any global or Xexternal data must be declared as ``noshare'' in order for the VMS Xcallable editor support to work properly. This applies to all global Xdata used in the VMS version, but not to routines or to ``static ''data. XThe ``noshare'' declaration is #define'd away on non-VMS systems. If you Xfail to do this, VMS will not allow you to INSTALL MicroEMACS as a Xsharable library. X.bp X.fi X X.if '\*(ct'Chapter' \{\ X.af ch A X.nr ch 0 1 X.ds ct Appendix X.fi\} X.CH "Mode Flags" X X X The two environment variables, $cmode and $gmode, contain a Xnumber the corresponds to the modes set for the current buffer and Xthe editor as a whole. These are encoded as the sum of the following Xnumbers for each of the possible modes: X X.nf X.ft CW X XWRAP 1 Word wrap XCMODE 2 C indentation and fence match XSPELL 4 Interactive spell checking (Not Implemented Yet) XEXACT 8 Exact matching for searches XVIEW 16 Read-only buffer XOVER 32 Overwrite mode XMAGIC 64 Regular expressions in search XCRYPT 128 Encryption mode active XASAVE 256 Auto-save mode\fR X.fi X X\fB X X So, if you wished to set the current buffer to have CMODE, XEXACT, and MAGIC on, and all the others off, you would add up the values Xfor those three, CMODE 2 + EXACT 8 + MAGIC 64 = 74, and use a Xstatement like: X Xset $cmode 74 X X or, use the binary or operator to combine the different modes: X Xset $cmode &bor &bor 2 8 64 X X.ad l X\s+8Internal Flags\s-8 X.na X X X Some of the ways EMACS controls its internal functions can be Xmodified by the value in the $gflags environment Xvariable. Each bit in this variable will be used to control a Xdifferent function. X X.nf X.ft CW X XGFFLAG 1 If this bit is set to zero, EMACS will not X automatically switch to the buffer of the X first file after executing the startup macros.\fR X.fi X X\fB X X.ad l X\s+8Current buffer flags\s-8 X.na X X X The $cbflags environment variable allows the Xuser to modify some of the characteristics of the current buffer. The Xvarious characteristics are encoded as the sum of the following Xnumbers: X X.nf X.ft CW X XBFINVS 1 Internal invisible buffer XBFCHG 2 Changed since last write XBFTRUNC 4 buffer was truncated when read XBFNAROW 8 buffer has been narrowed\fR X.fi X X\fB X X Only the invisible and changed flags can be modified by setting Xthe $cbflags variable. The truncated file and narrowed flags are read Xonly. X.bp X.de hd X'sp |1.0i X.nr cl 0 1 X.mk X.. X.de fo X.ie \\n+(cl=1 \{ X.nr M \\n(.o X.po +3.5i X.rt X.ns \} X.el \{ X.po \\nMu X.if \\n%>=1 \{ X.vs 12p X.ft R X.ps 10 X'sp |\\n(.pu-0.5i X.if o .tl 'Index''Page %' X.if e .tl 'Page %''Index'.ps X.ft X.vs \} X'bp\} X.. X.nf X.ce 1 X\s+4\fBIndex\fR\s-4 X.ta 2.2i 3.5i 5.7i X.tc . X.de IX X\\$1 \\$2 X.. X.mk X.nr cl 0 1 X.so emacs.index X.bp X.TO END_OF_FILE echo shar: NEWLINE appended to \"'medoc.p05'\" if test 17604 -ne `wc -c <'medoc.p05'`; then echo shar: \"'medoc.p05'\" unpacked with wrong size! fi # end of 'medoc.p05' fi echo shar: End of archive 6 \(of 6\). cp /dev/null ark6isdone MISSING="" for I in 1 2 3 4 5 6 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 6 archives. echo "Remove the extra NEWLINE at the ends of medoc.p0[1-5] and" echo "Concatinate medoc.p* and execute troff" rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- Dave Klotzbach att!ihlpm!klotz IE 2F-518 (312) 416-7437