Dec 232017
 
Documentation for EMACS editor. (see emacs38b.arc).
File EMDOC38B.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Documentation for EMACS editor. (see emacs38b.arc).
File Name File Size Zip Size Zip Type
AZMAP.CMD 547 310 deflated
BDATA.CMD 531 298 deflated
EMACS.HLP 8841 3142 deflated
EMACS.KEY 5420 2012 deflated
EMACS.RC 5027 1294 deflated
EMACS.TUT 30250 10004 deflated
EMACS1.MSS 50966 16625 deflated
EMACSREF.TXT 70535 19163 deflated
IBMFN.LST 618 280 deflated
MAGIC.DOC 4005 1573 deflated
ME110.RC 1704 644 deflated
ME150.RC 1595 582 deflated
MENU.CMD 12595 1839 deflated
MENU1 8042 1794 deflated
README 21574 8339 deflated

Download File EMDOC38B.ZIP Here

Contents of the README file


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 TrooperFido 201/1(317) 423-22812400
AvatarFido 201/4(317) 497-19701200

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:

READMEThis file

EMACS.RCStandard startup file
ME110.RCHP110 startup file
ME150.RCHP150 startup file


EMACS.HLPOnline help file
EMACS.KEYCammond wallchart
EMACS.TUTOnline tutorial
EMACS.MSS Emacs Introduction document
EMACS1.MSSEmacs Reference guide
IBMFN.LSTIBM-PC function list
MAGIC.DOCRegular partern matching bulletin

AZMAP.CMDTranslate .SYM files to .MAP
BDATA.CMDBASIS Data statement builder
MENU.CMDSample Menu system
MENU1 datafile for menu syste

EMACSSRC.ARC includes the files:

ANSI.CANSI screen driver
BASIC.Cbasic cursor movement
BIND.Ckey binding commands
BUFFER.Cbuffer manipulation commands
CRYPT.Cencryption functions
DG10.CData General 10 screen driver
DISPLAY.Cmain display driver
EBIND.Hbinding list
EDEF.Hglobal variable declarations
EFUNC.Hfunction name list
EGAPC.CEGA screen driver
EPATH.Hdefault path settings
ESEARCH.Hsearch global declarations
ESTRUCT.Hconfiguration and structure definitions
EVAL.Cexpresion evaluator
EVAR.HEMACS macro variable declarations
EXEC.Cmacro execution functions
FILE.Cuser file functions
FILEIO.Clow level file I/O driver
HP110.CHP110 screen driver
HP150.CHP150(A or C) screen driver
IBMPC.CIBM-PC CGA and MONOCHROME driver
INPUT.Clow level user input driver
ISEARCH.Cincremental search functions
LINE.Ctext line manipulation functions
LOCK.Cfile locking functions
MAIN.Cargument parsing and command loop
RANDOM.Cother random user functions
REGION.Cregion cut & paste functions
SEARCH.Csearch and replace functions
SPAWN.COS interface driver
ST520.CATARI ST1040 screen driver [not verified]
TCAP.CTermcap screen driver
TERMIO.Clow level I/O driver
TIPC.CTI-PC screen driver
VMSVT.CVMS screen driver
VT52.CVT52 screen driver
WINDOW.Cwindow manipulation functions
WORD.Cword manipulation functions

EMACSEXE.ARC includes the files:

MEIBM.EXEIBM-PC CGA and MONO version
MEEGA.EXEIBM-PC EGA version
MEANSI.EXEMSDOS ANSI graphics version
ME110.EXEHP110 portable version
ME150.EXHP150 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
orihnp4!itivax!duncan!lawrence
ARPA:[email protected]
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
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 ).
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 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- 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.00Variables

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.01Environmental 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 ($).

$fillcolCurrent fill column
$pagelenNumber of screen lines used currently
$curwidthNumber of columns used currently
$curcolCurrent column of point in current buffer
$curlineCurrent line of point in current buffer
$flickerFlicker Flag
set to TRUE if IBM CGA
set to FALSE for most others
$cbufnameName of the current buffer
$cfnameFile name of the current buffer
$sresCurrent 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)
$debugFlag to trigger macro debugging (try it...
you'll like it!)
$statusreturn 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.02User 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.03Buffer 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.04Interactive 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.10Functions

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.

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.

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

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 )

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


String manipulation functions:(returns )

&CAT Concatinate the two strings to form one
&LEFt return the leftmost characters
from
&RIGht return the rightmost characters
from
&MID
Starting from position in ,
return characters.

Logical Testing functions:(returns )

&NOTReturn the opposite logical value
&EQUal If and are numerically
equal, return TRUE
&LESs If is less than , return
TRUE.
&GREater If is greater than, or equal to
, return TRUE.
&SEQual If the two strings are the same, return
TRUE.
&SLEss If is less alphabetically than
, return TRUE.
&SGReater If is alphabetically greater than
or equal to , return TRUE.

Special Functions:

&INDirectEvaluate 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.20Directives

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
26store-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"

<<>>


 December 23, 2017  Add comments

Leave a Reply