
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by tralfaz!ove on Wed Oct 19 12:36:00 EST 1988
# Contents:  menu.cmd menu1 readme
 
echo x - menu.cmd
sed 's/^@//' > "menu.cmd" <<'@//E*O*F menu.cmd//'
;	MENU.CMD:	Menu learning system for MicroEMACS 3.7
;
;			This file is executed to activate MicroEMACS's
;			menu interface code

;	setup windows for use

	add-global-mode "blue"
	1 split-current-window
	5 resize-window
	add-mode "red"
	view-file "menu1"
	name-buffer "menu window"
	change-file-name ""
	add-mode "view"
	next-window

;	Load menu routines as needed

;	Activate Main Menu

1	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<01"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key execute-macro-3	FN;
	bind-to-key execute-macro-4	FN<
	bind-to-key execute-macro-5	FN=
	bind-to-key execute-macro-6	FN>
	bind-to-key execute-macro-7	FN?
	bind-to-key execute-macro-8	FN@
	bind-to-key execute-macro-9	FNA
	bind-to-key execute-macro-2	FNB
	bind-to-key execute-macro-10	FNC
	bind-to-key exit-emacs		FND
	clear-message-line
!endm

;	and bring that menu up

	execute-macro-1
	write-message "         [loading MENU system]"

;	set up the editor control menu

2	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<02"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key execute-macro-11	FN;
	bind-to-key execute-macro-12	FN<
	bind-to-key execute-macro-13	FN=
	bind-to-key execute-macro-14	FN>
	bind-to-key execute-macro-15	FN?
	bind-to-key execute-macro-16	FN@
	bind-to-key execute-macro-17	FNA
	bind-to-key execute-macro-18	FNB
	bind-to-key execute-macro-19	FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

;	Activate word case/screen control Menu

3	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<03"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key case-word-upper	FN;
	bind-to-key case-region-upper	FN<
	bind-to-key case-word-lower	FN=
	bind-to-key case-region-lower	FN>
	bind-to-key case-word-capitalize FN?
	unbind-key FN@
	bind-to-key clear-and-redraw	FNA
	bind-to-key set-mark		FNB
	bind-to-key redraw-display	FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

;	Activate paging/scrolling Menu

4	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<08"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key previous-page	FN;
	bind-to-key next-page		FN<
	bind-to-key move-window-down	FN=
	bind-to-key move-window-up	FN>
	bind-to-key scroll-next-up	FN?
	unbind-key 			FN@
	bind-to-key scroll-next-down	FNA
	unbind-key 			FNB
	bind-to-key exchange-point-and-mark FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

;	Activate cut & paste Menu

5	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<04"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key set-mark		FN;
	unbind-key FN<
	bind-to-key kill-region		FN=
	unbind-key FN>
	bind-to-key copy-region		FN?
	unbind-key FN@
	bind-to-key yank		FNA
	unbind-key FNB
	unbind-key FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

;	Activate Search & replace Menu

6	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<09"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key search-forward	FN;
	bind-to-key search-reverse	FN<
	bind-to-key hunt-forward	FN=
	bind-to-key hunt-backward	FN>
	bind-to-key incremental-search	FN?
	bind-to-key reverse-incremental-search FN@
	bind-to-key replace-string	FNA
	bind-to-key query-replace-string FNB
	unbind-key FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

;	Activate Deletion Menu

7	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<05"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key delete-previous-character FN;
	unbind-key FN<
	bind-to-key delete-next-character FN=
	unbind-key FN>
	bind-to-key kill-to-end-of-line	FN?
	unbind-key FN@
	bind-to-key delete-blank-lines	FNA
	unbind-key FNB
	unbind-key FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

;	Activate Word procesing Menu

8	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<10"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key previous-word	FN;
	bind-to-key next-word		FN<
	bind-to-key previous-paragraph	FN=
	bind-to-key next-paragraph	FN>
	bind-to-key fill-paragraph	FN?
	bind-to-key kill-paragraph	FN@
	bind-to-key delete-previous-word FNA
	bind-to-key delete-next-word	FNB
	bind-to-key count-words		FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

;	Activate Insertion Menu

9	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<06"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key open-line		FN;
	bind-to-key insert-string	FN<
	bind-to-key handle-tab		FN=
	bind-to-key quote-character	FN>
	bind-to-key insert-space	FN?
	bind-to-key transpose-characters FN@
	bind-to-key newline-and-indent	FNA
	unbind-key FNB
	bind-to-key newline		FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

;	Activate Cursor movement Menu

10	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<07"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key beginning-of-file	FN;
	bind-to-key previous-line	FN<
	bind-to-key backward-character	FN=
	bind-to-key forward-character	FN>
	bind-to-key end-of-file		FN?
	bind-to-key next-line		FN@
	bind-to-key beginning-of-line	FNA
	bind-to-key end-of-line		FNB
	bind-to-key execute-macro-21	FNC
	bind-to-key execute-macro-1	FND
	clear-message-line
!endm

21	store-macro
	@"Line number to go to: " goto-line
!endm

;	Activate Buffer Menu

11	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<11"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key buffer-position	FN;
	bind-to-key unmark-buffer	FN<
	bind-to-key delete-buffer	FN=
	bind-to-key next-buffer		FN>
	bind-to-key list-buffers	FN?
	bind-to-key execute-macro-22	FN@
	bind-to-key name-buffer		FNA
	unbind-key FNB
	bind-to-key select-buffer	FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

22	store-macro
	filter-buffer @"Name of DOS filter: "
!endm
;	Macro Menu

12	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<11"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key begin-macro		FN;
	unbind-key FN<
	bind-to-key end-macro		FN=
	unbind-key FN>
	bind-to-key execute-macro	FN?
	unbind-key FN@
	unbind-key FNA
	unbind-key FNB
	unbind-key FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

;	Color change Menu

13	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<12"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key execute-macro-23	FN;
	unbind-key FN<
	bind-to-key execute-macro-24	FN=
	unbind-key FN>
	bind-to-key execute-macro-25	FN?
	unbind-key FN@
	bind-to-key execute-macro-26	FNA
	unbind-key FNB
	unbind-key FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

;	Set forground color

23	store-macro
	save-window
	1 next-window
	select-buffer "[color]"
	beginning-of-file
	insert-string @"Color to change to: "
	newline
	beginning-of-file
	case-word-upper
	beginning-of-file
	unmark-buffer
	select-buffer "menu window"
	1 redraw-display
	restore-window
	add-mode #"[color]"
	delete-buffer "[color]"
!endm

;	Set background color

24	store-macro
	save-window
	1 next-window
	select-buffer "[color]"
	beginning-of-file
	insert-string @"Color to change to: "
	newline
	beginning-of-file
	case-word-lower
	beginning-of-file
	unmark-buffer
	select-buffer "menu window"
	1 redraw-display
	restore-window
	add-mode #"[color]"
	delete-buffer "[color]"
!endm

;	Set global forground color

25	store-macro
	save-window
	1 next-window
	select-buffer "[color]"
	beginning-of-file
	insert-string @"Color to change to: "
	newline
	beginning-of-file
	case-word-upper
	beginning-of-file
	unmark-buffer
	select-buffer "menu window"
	1 redraw-display
	restore-window
	add-global-mode #"[color]"
	delete-buffer "[color]"
!endm

;	Set global background color

26	store-macro
	save-window
	1 next-window
	select-buffer "[color]"
	beginning-of-file
	insert-string @"Color to change to: "
	newline
	beginning-of-file
	case-word-lower
	beginning-of-file
	unmark-buffer
	select-buffer "menu window"
	1 redraw-display
	restore-window
	add-global-mode #"[color]"
	delete-buffer "[color]"
!endm

;	set Mode Menu

14	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<17"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key add-mode		FN;
	bind-to-key add-global-mode	FN<
	bind-to-key delete-mode		FN=
	bind-to-key delete-global-mode	FN>
	unbind-key FN?
	bind-to-key execute-macro-27	FN@
	unbind-key FNA
	unbind-key FNB
	bind-to-key select-buffer	FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

27	store-macro
	@"Column to fill to: " set-fill-column
!endm

;	DOS command Menu

15	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<13"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key shell-command	FN;
	unbind-key FN<
	bind-to-key pipe-command	FN=
	unbind-key FN>
	bind-to-key i-shell		FN?
	unbind-key FN@
	bind-to-key quick-exit		FNA
	unbind-key FNB
	bind-to-key exit-emacs		FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

;	Script Menu

16	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<18"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key execute-file	FN;
	bind-to-key execute-command-line FN<
	bind-to-key execute-buffer	FN=
	bind-to-key execute-named-command FN>
	unbind-key FN?
	unbind-key FN@
	unbind-key FNA
	unbind-key FNB
	unbind-key FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

;	File access Menu

17	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<14"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key find-file		FN;
	bind-to-key save-file		FN<
	bind-to-key view-file		FN=
	bind-to-key write-file		FN>
	bind-to-key read-file		FN?
	bind-to-key change-file-name	FN@
	bind-to-key insert-file		FNA
	unbind-key FNB
	unbind-key FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

;	Window Menu

18	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<19"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key split-current-window FN;
	bind-to-key delete-other-windows FN<
	bind-to-key resize-window	FN=
	bind-to-key delete-window	FN>
	bind-to-key shrink-window	FN?
	bind-to-key grow-window		FN@
	bind-to-key next-window		FNA
	bind-to-key previous-window	FNB
	unbind-key FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

;	key binding Menu

19	store-macro
	save-window
	1 next-window
	beginning-of-file
	search-forward "<<15"
	next-line
	1 redraw-display
	restore-window
	update-screen

;	***** Rebind the Function key group

	bind-to-key bind-to-key		FN;
	unbind-key FN<
	bind-to-key unbind-key		FN=
	unbind-key FN>
	bind-to-key describe-key	FN?
	unbind-key FN@
	bind-to-key describe-bindings	FNA
	unbind-key FNB
	unbind-key FNC
	bind-to-key execute-macro-2	FND
	clear-message-line
!endm

	clear-message-line
@//E*O*F menu.cmd//
chmod u=rw,g=r,o=r menu.cmd
 
echo x - menu1
sed 's/^@//' > "menu1" <<'@//E*O*F menu1//'
--<<01>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 WORD CASE/SCREEN CONTROL   F2  PAGING/SCROLLING
[Main Menu]         F3 CUT & PASTE                F4  SEARCH AND REPLACE
                    F5 DELETION COMMANDS          F6  WORD PROCESSING
                    F7 INSERTION COMMANDS         F8  EDITOR CONTROL
 06/18/86           F9 CURSOR MOVEMENT            F10 exit MicroEMACS
--<<02>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 BUFFER CONTROL             F2  MACROS
[Editor control]    F3 COLOR CHANGES              F4  MODES
                    F5 DOS COMMANDS               F6  SCRIPTS
                    F7 FILE ACCESS                F8  WINDOWS
                    F9 KEY BINDINGS               F10 exit to MAIN MENU
--<<03>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 upper case a word          F2  upper case a region
 Word case &        F3 lower case a word          F4  lower case a region
  Screen control    F5 capitilize a word
                    F7 redraw the screen          F8  mark a region
                    F9 center the current line    F10 exit to MAIN MENU
--<<04>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1  mark a region
  Cut & Paste       F3  delete the region
                    F5  copy the region to the kill buffer
                    F7  insert the kill buffer into the text here
                                                  F10 exit to MAIN MENU
--<<05>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 delete the last character
  Deletions         F3 delete the next character
                    F5 delete to the end of the current line
                    F7 delete all the blank lines around the cursor
                                                  F10 exit to MAIN MENU
--<<06>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 open a blank line          F2  insert a prompted string
  Insertion         F3 insert a tab               F4  quote the next character
                    F5 insert a space             F6  transpose last 2 chars
                    F7 insert a newline and indent like the last line
                    F9 insert a newline           F10 exit to MAIN MENU
--<<07>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 begining of the file       F2  up one line
  Cursor Movement   F3 left                       F4  right
        F^2         F5 end of the file            F6  down one line
    F3 < + > F4     F7 begining of line           F8  end of line
        FV6         F9 goto line                  F10 exit to MAIN MENU
--<<08>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1  go up one page            F2  go down one page
  Paging and        F3  scroll the screen up      F4  scroll the screen down
     Scrolling      F5  make the next widow go up one page
                    F7  make the next window go down one page
                    F9  exchange cursor & mark    F10 exit to MAIN MENU
--<<09>>-----------------------------------------------------------------------
MicroEMACS 3.7      f1  search forward            f2  seach backwards
  Search and        F3  hunt forward              f4  hunt backwards
    Replace         F5  isearch forward           F6  isearch backward
                    F7  replace string            F8  replace string w/query
                                                  F10 exit to MAIN MENU
--<<10>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 go back a word             F2  go forward a word
  Word processing   F3 go back a paragraph        F4  go forward a paragraph
                    F5 fill paragraph             F6  delete current paragraph
                    F7 delete last word           F8  delete next word
                    F9 count words in region      F10 exit to MAIN MENU
--<<11>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 report position            F2  unmark buffer
  Buffer Control    F3 delete buffer              F4  switch to next buffer
                    F5 list all buffers           F6  filter buffer through
                    F7 rename current buffer             DOS program
                    F9 select buffer              F10 exit to CONTROL MENU
--<<12>>-----------------------------------------------------------------------
MicroEMACS 3.7      Colors:           |  F1 current window's forground color
  Color changes       Black   Magenta |  F3 current window's background color
                      Blue    Cyan    |  F5 global forground color
                      Red     Yellow  |  F7 global background color
                      Green   White   |           F10  exit to CONTROL MENU
--<<13>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1  execute one DOS command
  DOS commands      F3  pipe one DOS command to a buffer
                    F5  shell up to a new command interpeter
                    F7  QUICK exit (write out all changed buffers and exit)
                    F9  exit MicroEMACS           F10 exit to CONTROL MENU
--<<14>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 find file                  F2 save current file
  File Access       F3 view file (in VIEW mode)   F4 write file w/ new name
                    F5 read file into buffer      F6 change current file name
                    F7 insert file into buffer
                                                  F10  exit to CONTROL MENU
--<<15>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 bind a function to a key
  Key Bindings      F3 unbind a key
                    F5 describe a key
                    F7 describe all bindings
                                                  F10  exit to CONTROL MENU
--<<16>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 define macro         The keyboard macro only works
  Keyboard Macro    F3 end macro            for standard commands, NOT for
                    F5 execute macro        menu selections.

                                                  F10  exit to CONTROL MENU
--<<17>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 set mode                   F2  set global mode
  Modes             F3 delete mode                F4  delete global mode
            Standard modes are:                   F6  set fill column
                WRAP  VIEW  CMODE  EXACT OVER MAGIC
                                                  F10 exit to CONTROL MENU
--<<18>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 execute script file        F2  execute script line
  Script            F3 execute script in buffer   F4  execute command (by name)
            Script line format:
         {<repeat count>} <command name> {<argument(s)> | "<argument(s)>"}
                                                  F10  exit to CONTROL MENU
--<<19>>-----------------------------------------------------------------------
MicroEMACS 3.7      F1 split current window       F2  delete all other windows
  Windows           F3 resize window              F4  delete current window
                    F5 shrink window              F6  enlarge window
                    F7 next window                F8  previous window
                                                  F10 exit to CONTROL MENU
-------------------------------------------------------------------------------
@//E*O*F menu1//
chmod u=rw,g=r,o=r menu1
 
echo x - readme
sed 's/^@//' > "readme" <<'@//E*O*F readme//'
		MicroEMACS 3.8b Release Notes

**********************************************************************

	(C)opyright 1987 by Daniel M. Lawrence
	MicroEMACS 3.8 can be copied and distributed freely for any
	non-commercial purposes. MicroEMACS 3.8 can only be incorporated
	into commercial software with the permission of the current author.

(	Notice the copyright.....a number of large companies decided to use
MicroEMACS 3.7 and 3.7i as the shell of their products, and several of
the ones I contacted were not even courteos enough to send me their
product for my personal use.  I am not out to make a fortune on this,
but a little common courtesy would be appreciated.)

**********************************************************************

	It has been quite a while since the last realease and there are
a large number of new features and enhancements to old features.  There
is now a full extension language and there is also support nearly
completed for a number of newer 68000 machines.  The edit history at the
beginning of the MAIN.C file details the changes. 

	MicroEMACS 3.8 is availible in a couple of different ways. 
First, it is availible via my bulletin board system..... 

	The Programmer's Room
	FIDO 201/2
	(317) 742-5533
	24 hours  300/1200 baud

	Also it should be online on the following BBS's:

	The Starship Trooper	Fido 201/1	(317) 423-2281	2400
	Avatar			Fido 201/4	(317) 497-1970	1200

	There it is arranged as three MSDOS .ARC files, EMACSDOC.ARC
which contains the documentation and command files, EMACSSRC.ARC which
contains the sources and the UNIX Makefile, and EMACSEXE.EXE which
contains the MSDOS executables.  Also all the various executables are
availibile individualy. 

EMACSDOC.ARC includes the files:

	README		This file
	
	EMACS.RC	Standard startup file
	ME110.RC	HP110 startup file
	ME150.RC	HP150 startup file
	
	
	EMACS.HLP	Online help file
	EMACS.KEY	Cammond wallchart
	EMACS.TUT	Online tutorial
	EMACS.MSS       Emacs Introduction document
	EMACS1.MSS	Emacs Reference guide
	IBMFN.LST	IBM-PC function list
	MAGIC.DOC	Regular partern matching bulletin
	
	AZMAP.CMD	Translate .SYM files to .MAP
	BDATA.CMD	BASIS Data statement builder
	MENU.CMD	Sample Menu system
	MENU1		   datafile for menu syste

EMACSSRC.ARC includes the files:

	ANSI.C		ANSI screen driver
	BASIC.C		basic cursor movement
	BIND.C		key binding commands
	BUFFER.C	buffer manipulation commands
	CRYPT.C		encryption functions
	DG10.C		Data General 10 screen driver
	DISPLAY.C	main display driver
	EBIND.H		binding list
	EDEF.H		global variable declarations
	EFUNC.H		function name list
	EGAPC.C		EGA screen driver
	EPATH.H		default path settings
	ESEARCH.H	search global declarations
	ESTRUCT.H	configuration and structure definitions
	EVAL.C		expresion evaluator
	EVAR.H		EMACS macro variable declarations
	EXEC.C		macro execution functions
	FILE.C		user file functions
	FILEIO.C	low level file I/O driver
	HP110.C		HP110 screen driver
	HP150.C		HP150(A or C) screen driver
	IBMPC.C		IBM-PC CGA and MONOCHROME driver
	INPUT.C		low level user input driver
	ISEARCH.C	incremental search functions
	LINE.C		text line manipulation functions
	LOCK.C		file locking functions
	MAIN.C		argument parsing and command loop
	RANDOM.C	other random user functions
	REGION.C	region cut & paste functions
	SEARCH.C	search and replace functions
	SPAWN.C		OS interface driver
	ST520.C		ATARI ST1040 screen driver [not verified]
	TCAP.C		Termcap screen driver
	TERMIO.C	low level I/O driver
	TIPC.C		TI-PC screen driver
	VMSVT.C		VMS screen driver
	VT52.C		VT52 screen driver
	WINDOW.C	window manipulation functions
	WORD.C		word manipulation functions

EMACSEXE.ARC includes the files:

	MEIBM.EXE	IBM-PC CGA and MONO version
	MEEGA.EXE	IBM-PC EGA version
	MEANSI.EXE	MSDOS ANSI graphics version
	ME110.EXE	HP110 portable version
	ME150.EX	HP150 version

	Also MicroEMACS should be availible from USENET via the
mod.sources notegroup, or its archives. A number of sites also make
MicroEMACS availible via FTP. Watch USENET news for info on these.

	MicroSCRIBE 1.0, which I had hoped to have ready by now, is only
about half written.  MicroEMACS took up more of my time in updates then
I had expected, however having this fairly advanced, and hopefully
fairly stable version, I can get back to getting MicroSCRIBE written. 
Also in the works for a later release is a spell checker (called
MicroSPELL rather predictably) and sometime next year, a integrated
thesaurus program. 

	A more customized MicroEMACS for the Macintosh, the Amiga and
the 1040ST will probably become availible in the next couple of months. 
Support for the mouse, standard file boxes, pull down menus and
different resolutions will be included.  If you can be of help in
getting this ready, please contact me. 

	As before, I will continue to support these programs, and
encourage everyone to spread them around as much as they can. If you
make what you think are changes that are usefull to many, send me the
updates, and as time permits, I will encorporate the ones I understand,
and agree with into the master sources. Being overswamped with mailers,
I have discontinued my mailing offer, but if you have a special problem
getting hold of MicroEMACS, contact me and we can work something out for
you.

	USmail:	Daniel Lawrence
		617 New York St
		Lafayette, IN 47901

	UUCP:	ihnp4!pur-ee!pur-phy!duncan!lawrence
	or	ihnp4!itivax!duncan!lawrence
	ARPA:	nwd@j.cc.purdue.edu
	FIDO:	The Programmer's Room 201/2
		(317) 742-5533
	ATT:	(317) 742-5153




		New Features
		============

***	Path Searching

	If the OS of the operating system MicroEMACS is running under
has environmental variables, MicroEMACS will read in the PATH variable
as a list of directories in which to look for its startup and help
files, in place of the list in the epath.h file.

***	Bindable Prefixes

	All the prefix keys can now be rebound. This includes:

		meta-prefix		<ESC>
		ctlx-prefix		^X
		universal-argument	^U
		quote-character		^Q

***	HP150 function keys

	can now both be labeled and bound.

***	New Help Function

	The APROPOS (M-A) function prompts for a string, and then
prepares a list of all named functions that contain the string. This is
usefull for finding all comands that deal with one topic.

***	File Encryption

	Text files can now be encrypted (and decrypted <very useful>).
The encryption method (written by Dana Hoggat) results in ALL legal
printing characters, leaving files suitable for mailing and moving
around between systems. The -k <encryption key> command line switch
places the first file into the edit buffer using the named key. CRYPT is
a mode which can be set on any buffer, and set-encryption-key (M-E) sets
the encryption key of the current buffer. If you attempt to write out a
buffer in crypt mode without specifying the key, MicroEMACS will
automatically prompt you for it.

***	Keyboard Macros rewritten

	The code for processing keyboard macros now records the responses
to all prompts as well as just the command keystrokes.

***	Restrictive Mode

	The -r command line switch prevents EMACS from executing many of
its commands which would allow you to break out of it, or edit files
other then the ones named on the command line.  This is usefull for
products that need to restrict access to the OS from inside the editor
(for example, BBS systems).

***	Word wrap made more flexible

	When emacs determined it is time to word wrap (when in wrap
mode) it calls the function which is bound to the illegal keystroke,
M-FNW. This keystroke is normally bound to wrap-word (M-FNW), but can be
rebound by the user so EMACS can do different things at wrap time (like
auto indention in different languages).

***	Fence Matching

	The goto-matching-fence (M-^F) command jumps the cursor to the
matching fence, or beeps if there is none.

***	Dynamic Screen Re-sizing

	The size that EMACS uses for editing can be changed with the
change-screen-size (M-^S) and change-screen-width (M-^T) commands. These
can then be usefull in integrating EMACS on window based machines.

***	IBMPC drivers combined...

	The IBM-PC CGA and MONOCHROME drivers have been combined into
one driver which will look up the graphics adapter type at startup and
adjust accordingly.

***	EXTENTION LANGUAGE

	MicroEMACS is now equipped with a fully functional extention
language in which to write macros.  These macros can be saved, recalled
and bound to keystrokes, thus allowing a high degree of customization. 
What follows is an exerpt from what will become the new MicroEMACS
reference manual. 

Chapter x:		MicroEMACS Macros

	Macros are programs that are used to customize the editor and to
perform complicated editing tasks.  They may be stored in files or
buffers and may be executed using an appropriate command, or bound to a
particular keystroke.  Portions of the standard start-up file are
impliment via macros, as well as the example menu system.  The
execute-macro-<n> editor commands cause the macros, numbered from 1 to
40, to be executed.  Macros are stored by executing files that contain
the store-macro command.

	There are many different aspects to the macro langage within
MicroEMACS.  Editor commands are the various commands that manipulate
text, buffers, windows, etc, within the editor.  Directives are commands
which control what lines get executed within a macro.  Also there are
various types of variables.  Environmental variables both control and
report on different aspects of the editor.  User variables hold string
values which may be changed and inspected.  Buffer variables allow text
to be placed into variables.  Interactive variable allow the program to
prompt the user for information.  Functions can be used to manipulate
all these variables. 

x.00	Variables

	Variables in MicroEMACS can be used to return values within
expressions, as repeat counts to editing commands, or as text to be
inserted into buffers and messages.  The value of these variables is set
using the set (^X-A) command.  For example, to set the current fill
column to 64 characters, the following macro line would be used:

	set $fillcol 64

	or to have the contents of %NAME inserted at the point in the
current buffer, the command to use would be:

	insert-string %name


x.01	Environmental Variables

	"What good is a quote if you can't change it?"

	These variables are used to change different aspects of the way
the editor works.  Also they will return the current settings if used as
part of an expresion.  All environmental variable names begin with a
dollar sign ($). 

	$fillcol	Current fill column
	$pagelen	Number of screen lines used currently
	$curwidth	Number of columns used currently
	$curcol		Current column of point in current buffer
	$curline	Current line of point in current buffer
	$flicker	Flicker Flag
				set to TRUE if IBM CGA
				set to FALSE for most others
	$cbufname	Name of the current buffer
	$cfname		File name of the current buffer
	$sres		Current screen resolution
			(CGA or MONO on the IBM-PC driver...
			 EGA on the EGA driver
			 LOW MEDIUM or HIGH on the Atari ST1040
			 NORMAL on all others)
	$debug		Flag to trigger macro debugging (try it...
				you'll like it!)
	$status		return status of the success of the last command
			(TRUE or FALSE) usually used with !force

	Obviously, many more of these variables will be availible in
future releases of MicroEMACS. (Yes, send a vote for your favorite new
environmental variables today).

x.02	User variables

	User variables allow you, the user, to store strings and
manipulate them.  These strings can be pieces of text, numbers (in text
form), or the logical values TRUE and FALSE.  These variables can be
combined, tested, inserted into buffers, and otherwise used to control
the way your macros execute. At the moment, up to 100 user variables may
be in use in one editing session.  All users variable names must begin
with a percent sign (%) and may contain any printing characters.  Only
the first 10 characters are significant (ie differences beyond the tenth
character are ignored). Most operators will truncate strings to a length
of 128 characters.

x.03	Buffer Variables

	Buffer variables are special in that they can only be queried
and cannot be set.  What buffer variables are is a way to take text from
a buffer and place it in a variable. For example, if I have a buffer by
the name of RIGEL2, and it contains the text:

	Richmond
	Lafayette
	<*>Bloomington		(where <*> is the current point)
	Indianapolis
	Gary
	=* MicroEMACS 3.8 (WRAP) == rigel2 == File: /data/rigel2.txt =====

	and within a command I reference #rigel2, like:

	insert-string #rigel2

	MicroEMACS would start at the current point in the RIGEL2
buffer and grab all the text up to the end of that line and pass that
back.  Then it would advance the point to the beginning of the next line.
Thus, after our last command executes, the string "Bloomington" gets
inserted into the current buffer, and the buffer RIGEL2 now looks like
this:

	Richmond
	Lafayette
	Bloomington
	<*>Indianapolis		(where <*> is the current point)
	Gary
	=* MicroEMACS 3.8 (WRAP) == rigel2 == File: /data/rigel2.txt =====

	as you have probably noticed, a buffer variable consists of the
buffer name, preceded by a pound sign (#).

x.04	Interactive variables

	Interactive variables are actually a method to prompt the user
for a string.  This is done by using an at sign (@) followed either with
a quoted string, or a variable containing a string.  The string is the
placed on the bottom line, and the editor waits for the user to type in
a string.  Then the string typed in by the users is returned as the
value of the interactive variable.  For example:

	set %quest "What file? "
	find-file @%quest

	will ask the user for a file name, and then attempt to find it.


x.10	Functions

	Functions can be used to manipulate variables in various ways. 
Functions can have one, two, or three arguments.  These arguments will
always be placed after the function on the current command line.  For
example, if we wanted to increase the current fill column by two, using
emacs's set (^X-A) command, we would write:

	set $fillcol &add $fillcol 2
         \      \      \      \     \____second operand
           \      \      \      \________first operand
             \      \      \_____________function to execute
               \      \__________________variable to set
                 \_______________________set (^X-A) command

	Function names always begin with the ampresand (&) character,
and are only significant to the first three characters after the
ampresand.  Functions will normal expect one of three types of
arguments, and will automatically convert types when needed.

	<num>	an ascii string of digits which is interpeted as a
		numeric value.  Any string which does not start with a
		digit or a minus sign (-) will be considered zero.

	<str>	An arbitrary string of characters.  At the moment,
		strings are limited to 128 characters in length.

	<log>	A logical value consisting of the string "TRUE" or
		"FALSE". Numeric strings will also evaluate to "FALSE"
		if they are equal to zero, and "TRUE" if they are
		non-zero. Arbitrary text strings will have the value of
		"FALSE".

	A list of the currently availible functions follows: (Once
again, send in those votes on what kind of functions you would like to
see added!)

Numeric Functions:	(returns <num>)

&ADD		<num> <num>	Add two numbers
&SUB		<num> <num>	Subtract the second number from the first
&TIMes		<num> <num>	Multiply two numbers
&DIVide		<num> <num>	Divide the first number by the second
				giving an integer result
&MOD		<num> <num>	Return the reminder of dividing the
				first number by the second
&NEGate		<neg>		Multiply the arg by -1


String manipulation functions:	(returns <str>)

&CAT		<str> <str>	Concatinate the two strings to form one
&LEFt		<str> <num>	return the <num> leftmost characters
				from <str>
&RIGht		<str> <num>	return the <num> rightmost characters
				from <str>
&MID		<str> <num1> <num2>
				Starting from <num1> position in <str>,
				return <num2> characters.

Logical Testing functions:	(returns <log>)

&NOT		<log>		Return the opposite logical value
&EQUal		<num> <num>	If <num> and <num> are numerically
				equal, return TRUE
&LESs		<num1> <num2>	If <num1> is less than <num2>, return
				TRUE.
&GREater	<num1> <num2>	If <num1> is greater than, or equal to
				<num2>, return TRUE.
&SEQual		<str1> <str2>	If the two strings are the same, return
				TRUE.
&SLEss		<str1> <str2>	If <str1> is less alphabetically than
				<str2>, return TRUE.
&SGReater	<str1> <str2>	If <str1> is alphabetically greater than
				or equal to <str2>, return TRUE.

Special Functions:

&INDirect	<str>		Evaluate <str> as a variable.

	This last function deserves more explaination. The &IND function
evaluates its argument, takes the resulting string, and then uses it as
a variable name.  For example, given the following code sequence:

	; set up reference table

	set %one	"elephant"
	set %two 	"giraffe"
	set %three 	"donkey"

	set %index "two"
	insert-string &ind %index

	the string "giraffe" would have been inserted at the point in
the current buffer.  This indirection can be safely nested up to about
10 levels.

x.20	Directives

	Directives are commands which only operate within an executing
macro, ie they do not make sense as a single command. As such, they
cannot be called up singly or bound to keystroke. Used within macros,
they control what lines are executed and in what order.

	Directives always start with the exlaimation mark (!) character
and must be the first thing placed on a line. Directives executed singly
(via the execute-command-line command) interactively will be ignored.

x.21	!ENDM Directive

	This directive is used to terminate a macro being stored. For
example, if a file is being executed contains the text:

	;	Read in a file in view mode, and make the window red
	26	store-macro
		find-file @"File to view: "
		add-mode "view"
		add-mode "red"
	!endm

	write-message "[Consult macro has been loaded]"

	only the lines between the store-macro command and the !ENDM
directive are stored in macro 26.

x.22	!FORCE Directive

	When MicroEMACS executes a macro, if any command fails, the
macro is terminated at that point. If a line is preceeded by a !FORCE
directive, execution continues weather the command succeeds or not. For
example:

	;	Merge the top two windows

	save-window		;remember what window we are at
	1 next-window		;go to the top window
	delete-window		;merge it with the second window
	!force restore-window	;This will continue irregardless
	add-mode "red"

x.23	!IF, !ELSE, and !ENDIF Directives

	This directive allows statements only to be executed if a
condition specified in the directive is met.  Every line following the
!IF directive, until the first !ELSE or !ENDIF directive, is only
executed if the expresion following the !IF directive evaluates to a
TRUE value.  For example, the following macro segment creates the
portion of a text file automatically.  (yes believe me, this will be
easier to understand then that last explaination....)

	!if &sequal %curplace "timespace vortex"
		insert-string "First, rematerialize~n"
	!endif
	!if &sequal %planet "earth"	;If we have landed on earth...
		!if &sequal %time "late 20th century"  ;and we are then
			write-message "Contact U.N.I.T."
		!else
			insert-string "Investigate the situation....~n"
			insert-string "(SAY 'stay here Sara')~n"
		!endif
	!else
		set %conditions @"Atmosphere conditions outside? "
		!if &sequal %conditions "safe"
			insert-string &cat "Go outside......" "~n"
			insert-string "lock the door~n"
		!else
			insert-string "Dematerialize..try somewhen else"
			newline
		!endif
	!endif

x.24	!GOTO Directive

	Flow can be controlled within a MicroEMACS macro using the !GOTO
directive. It takes as an argument a label. A label consists of a line
starting with an asterick (*) and then an alphanumeric label.  Only
labels in the currently executing macro can be jumped to, and trying to
jump to a non-existing label terminates execution of a macro.  For
example..

	;Create a block of DATA statements for a BASIC program

		insert-string "1000 DATA "
		set %linenum 1000

	*nxtin
		update-screen		;make sure we see the changes
		set %data @"Next number: "
		!if &equal %data 0
			!goto finish
		!endif

		!if &greater $curcol 60
			2 delete-previous-character
			newline
			set %linenum &add %linenum 10
			insert-string &cat %linenum " DATA "
		!endif

		insert-string &cat %data ", "
		!goto nxtin

	*finish

		2 delete-previous-character
		newline

x.25	!RETURN Directive

	The !RETURN Directive causes the current macro to exit, either
returning to the caller (if any) or to interactive mode.  For example:

	;	Check the monitor type and set %mtyp

	!if &sres "CGA"
		set %mtyp 1
		!return
	!else
		set %mtyp 2
	!endif

	insert-string "You are on a MONOCHROME machine!~n"

<<<END OF MANUAL EXCERPT>>>
@//E*O*F readme//
chmod u=rw,g=r,o=r readme
 
exit 0
