This document presents some basic information that users should know in
order to use JED effectively.  In addition, read system dependent
documentation for information specific to a particular OS.

Contents: (search for @name)

    Introduction
    Installing JED
    Starting JED
    Startup FIles
    Emacs Emulation
    EDT Emulation
    Eight Bit Clean Issues
      Displaying Characters with the High Bit Set
      Inputting Characters with the High Bit Set
      Upper Case - Lower Case Conversions

    File Types and Sizes
    Backup and Autosave Files
    Status line and Windows
    MiniBuffer
      File Names
      Buffer Name and File Name Completion
      
    Basic Editing
      Marking Text (Point and Mark)
      Tabs
      Searching
      Rectangles
      
    Modes:
      Wrap Mode
         Formatting paragraphs
	 ``Smart'' Quotes
      C Mode
      Fortran Mode

    KeyBoard Macros
    Shells and Shell Commands
    Getting Help
    Miscellaneous
      Abort Character
      Display Sizes
      Hooks
      
@Introduction 

   If you have any questions/comments/bug reports, please do not hesitate to
   send an email to me at `davis@amy.tch.harvard.edu.' In any case, I'd like
   to keep a mailing list of people who use JED.  In this way I can keep you
   up to date on new JED versions, bugs, etc... Remember, the software is
   FREE, I am not going to haunt you. 

   Please email the information to me:

           davis@amy.tch.harvard.edu  (internet)
	   davis@ohstpy (BITNET)

@Installing JED

   Building JED requires the use of a C compiler which understands function
   prototypes.  I have sucessfully built JED with `cc' on the ULTRIX, VMS,
   and IRIX operating systems.  In addition, I have created it using `gcc'
   under SunOS.  I do not know whether it will compile under Microsoft C---
   I have only used Borland's Turbo C and BCC 3.0.

   With the above in mind:

         UNIX:  read install.unx

	 VMS:  read install.vms

	 IBMPC: read install.pc

   When Jed starts up, it tries to load a site initialization file called
   `site.sl'.  Site specific commands are to be placed here.  Most likely,
   it will define keys, etc... What goes in it is left to the discretion of
   the user or system manager.  See the file `site.sl' for examples. 

         If you intend to use characters with ASCII codes greater
	 than 127, it is important to read the section on ``Eight
	 Bit Clean Issues'' to install JED in an 8 bit clean
	 manner.

   When loading site.sl as well as other files (the user's personal
   initialization file (.jedrc or jed.rc) is a special case, see below). JED
   searches the default directory first, then checks for the environment
   variable JED_LIBRARY and searches it.  Here are some examples of setting
   this variable for different systems:

     VMS:  define/job JED_LIBRARY  dev$lib:[jedfiles]

     UNIX:  setenv JED_LIBRARY '/usr/local/lib/jed'

     IBMPC:  set JED_LIBRARY = c:\editors\jed\lib

     You will probably want to put these in your login/startup files
     (autoexec.bat, login.com, .cshrc).

@Startup Files:

   When JED is started up, it tries to load the file `site.sl' from the
   directory pointed to by the the environment variable JED_LIBRARY.  This
   file contains startup information and site dependent defaults.  Then JED
   tries to load the user's personal initialization file.  It first looks in
   the directory pointed to by the environment variable `JED_HOME'.  If that
   fails, it then searches the HOME directory and upon failure searches the
   default directory.

   The name of the user initialization file varies according to the
   operating system.  On unix systems this file must be called `.jedrc'
   while on VMS and MSDOS, it goes by the name jed.rc.  For VMS systems, the
   HOME directory corresponds to the SYS$LOGIN logical name while for the
   other two systems, it corresponds to the HOME environment variable.
   
@Starting JED

   Normally, jed is started as : jed filename or jed file_list
   However, jed also takes the following switches:
  
      -n                     do not load jed.rc (.jedrc) file
      -g line_number         goto linenumber
      -l file                load file as S-Lang code
      -f function            execute S-Lang function
      -s string              search for string

   It is possible to completely change JED's comand line syntax through the
   use of the user defined function `command_line_hook'.  See the section on
   Hooks for details.

@Emacs Emulation

   Emacs Emulation is provided by the S-Lang code in emacs.sl.  I have tried
   to emulate the basic functionality of Emacs so that most Emacs users
   should have no problem with JED.  To enable Emacs emulation in JED, put
   the line:

			   "emacs.sl"	evalfile pop
			   
   in your jed.rc (.jedrc) startup file.  See the section on Startup Files
   for more information.
   
@EDT Emulation

   For EDT emulation, make sure the line
   
			   "edt.sl"	evalfile pop
			   
   is in your jed.rc (.jedrc) Startup File.  This emulation provides a near
   identical emulation of the EDT keypad key commands.  In addition, the
   smaller keypad on the newer DEC terminals is also setup.  If you want
   both Emacs and EDT emulation, be sure that emacs.sl gets loaded first.
   
   One minor difference between JED's EDT emulation and EDT concerns the
   Control-H key.  EDT normally binds this to move the cursor to the
   beginning of the line.  However, JED uses it as a help key.
   Nevertheless, it is possible to rebind it.  See the section on rebinding
   keys as well as the file edt.sl for hints.

@Eight Bit Clean Issues

@@Displaying Characters with the High Bit Set

  There are several issues here.  The most iportant issue is how to get JED
  to display 8 bit characters in a ``clean'' way.  By ``clean'' I mean any
  character with the hi bit set is sent to the display device as is.  This is
  achieved by putting the line:
  
			    1 =DISPLAY_EIGHT_BIT
			    
  in your jed.rc (.jedrc) startup file.  European systems might want to put
  this in the file site.sl for all users.  The default is 1 so unless its
  value has been changed, this step may not be necessary.

  There is another issue. Suppose you want to display 8 bit characters with
  ASCII codes greater than or equal to some value, say 161.  This is done by
  setting `161 =DISPLAY_EIGHT_BIT'.  I believe that ISO Latin character sets
  assume this.  This has been done if iso-latin.sl has been loaded.

@@Inputting Characters with the High Bit Set

  Inputting a character into JED with the hi bit set is another issue.  How
  JED interprets this is controlled by the variable META_CHAR.  Specifically
  what happens is this: When JED reads a character from the input device
  with the hi bit set, it:  
  
     1. Checks the value of META_CHAR.  If this value is -1, JED simply
        inserts the charcter into the buffer.
	
     2. For any other value of META_CHAR, JED returns a two 7-bit character
        sequence.  The first character reurns is META_CHAR itself.  Then
	next character returned is the original character but with the high
	bit stripped. 

  The default value of META_CHAR is -1 which means that when JED sees a
  character with the high bit set, JED leaves it as is.  Please note that a
  character with the high bit set CANNOT be the prefix character of a
  keymap. It can be a part of the keymap but not the prefix.

  Some systems strip the high bit so it is necessary to find out how to do
  this for your system.  JED is able to insert ANY character in the range
  0-255 on a 7 bit system.  This is done through the use of the
  "quoted_insert" function which is bound to the backquote (`) key by
  default.  If the quoted_insert function is called with a digit argument
  (repeat argument), the character with the value of the argument is
  inserted into the buffer.  Operationally, one hits the escape key (^[),
  enters the ascii code and hits the backquote key.  For example, to insert
  character 255 into the buffer, simple hit the following keys:  ESC 2 5 5 `
  
@@Upper Case - Lower Case Conversions

  The above discussion centered around input and output of characters with
  the high bit set.  How JED treats them internally is another issue and new
  questions arise.  For example, what is the uppercase equivalent of a
  character with ASCII code 231?  This may vary from language to language. I
  have even been told that some languages have characters whose upper case
  equivalent correspond to multiple characters.  For JED, I have made the
  following assumptions:

            1. Each character is only 8 bits.
	    2. Each character has a unique uppercase equivalent.
	    3. Each character has a unique lowercase equivalent.
	    
  It would be nice if I were able to make a fourth assumption:

	    The ascii value of the lowercase of a character is
	    greater than or equal to its uppercase partner.

  However, apparantly this is not possible since most IBMPC character sets
  violate this assumption.  Hence, JED does not assume it.  Suppose X is the
  ascii value of the upper case of some character and suppose x is the ascii
  value of it lower case.  Then to make JED award of this fact, it may be
  necessary to put something of the form:

			       X x define_case

  in your starup file.  For example, suppose 211 is the uppercase of 244.
  Then `211 244 define_case' will make JED use this fact in operations
  involving the case of a character.  

  I have attempted to do this for the ISO Latin 1 character set. See the
  file `iso-latin.sl' for details. For MSDOS, this will not work. Instead
  use the files `dos437.sl' and `dos850.sl'.  By default, JED's internal
  lookup tables are initialized to the ISO Latin set for unix and VMS
  systems and to dos437 for the IBMPC.  To change the defaults, it is only
  necessary to load the appropriate file. For example, to load dos850.sl
  definitions, put

			  "dos850.sl" evalfile pop

  in your startup file (e.g., site.sl).  In addition to uppercase/lowercase
  information, these files also contain word definitions, i.e., which
  characters constitute a ``word''.

@File Types and Sizes

   JED is a text editor-- this version does not edit binary files.  Although
   lines may be of arbitrary length they are wrapped at 500 characters for
   display purposes.  It is capable of editing arbitrarily large buffers as
   ong as there is enough memory for the buffer as well as the overhead
   involved.  This editor employs a linked list representation hence the
   overhead can be quite high.

@Backup and Autosave Files

   On UNIX and MSDOS systems, JED creates backup files by appending a `~'
   character to the filename.  The VMS operating system handles backup files
   itself.  JED periodically autosaves its buffers.  On UNIX and MSDOS,
   autosave files are prefixed with the pound sign `#'.  On VMS, they are
   prefixed with `_$'.  The autosave interval may be changed by the user by
   setting the variable MAX_HITS. The default is 300 ``hits'' on the buffer.
   A ``hit'' is defined as a key which MAY change the state of the buffer.
   Cursor movement keys do not cause hits on the buffer.
   
   On UNIX systems, JED catches most of the signals and tries to autosave
   its buffers in the event of a crash or if the phone hangs up.

@Status line and Windows

   JED supports multiple windows.  Each window may contain the same buffer
   or different buffers.  A status line is displayed immediately below each
   window.  The status line contains information such as the JED version
   number, the buffer name, ``mode'', etc.  Please beware of the
   following indicators: 
   
        `**' : buffer has been modified since last save
	`%%' : buffer is read only
        `m'  : mark set indicator.  This means a region is being defined
	`d'  : file changed on disk indicator.  This indicates that the 
	       file associated with the buffer is newer than the buffer.
	`s'  : spot pushed indicator
	[Macro]: a macro is being defined.
	[Narrow]: buffer is narrowed to a region of LINES.
@MiniBuffer

   The MiniBuffer consists of a single line located at the bottom of the
   screen. Much of the dialog between the user and JED takes place in this
   buffer.  For example, when you search for a string, JED will prompt you
   for a string in the MiniBuffer.

   The MiniBuffer also provides a direct link to the S-Lang language. To
   do so, press Escape-X to get the `JED>' prompt.  Enter any valid S-Lang
   expression for evaluation by the interpreter.
   
   It is possible to to recall any data previously entered into the
   MiniBuffer by using the up and down arrow keys.  This makes it possible
   to edit previous expressions in a convenient and efficient manner.

@@File Names

   JED takes every file name and ``expands it'' according to a set of rules
   which vary according to the Operating System.  For concreteness, consider
   JED running under MSDOS.  Suppose the user reads a new file into the
   editor and via the `find_file' command which emacs binds to "^X^F".  Then
   the following might be displayed in the minibuffer:
   
   Find File: C:\JED\SLANG\
   
   Here JED is prompting for a name in the directory \JED\SLANG on disk C:.
   However, suppose the user wants to get the file C:\JED\SRC\VIDEO.C.  Then
   the following responses produce valid filenames when JED expands them
   internally:
   
   Find File: C:\JED\src\video.c
   Find File: C:\JED\SLANG\..\src\video.c
   Find File: C:\JED\SLANG\../src/video.c
   
   Note that the on MSDOS systems, JED replaces the `/' with a `\' and that
   case is not important.  Now suppose you wish to get the file VIDEO.C from
   disk A:.  The following are also valid:
       
   Find File: A:\video.c
   Find File: A:video.c
   Find File: C:\JED\SLANG\a:\video.c
   
   In the last case, JED is smart enough to figure out what you really want. 
   Although the above examples are for MSDOS systems, the rules also apply
   to unix and VMS systems as well.  The only change is the file name syntax. 
   For example, on VMS
   
		 sys$manager:[misc]dev$user:[davis.jed]vms.c
		 dev$user:[davis.jed]vms.c
   
   become equivalent filenames upon expansion.  For unix, the following are
   equivalent: 

		/user1/users/davis/jed/unix.c
		/usr/local/src//user1/users/davis/jed/unix.c
		/usr/local/src/~/jed/unix.c
  
   Note the last example: the tilde character (~) always expands into the
   users HOME directory, in this case to /user1/users/davis.
   
   When JED writes a buffer out to a file, it usually prompts for a file
   name in the minibuffer displaying the directory associated with the
   current buffer.  At this point a name can be appended to the
   directory string to form a valid file name or the user may simply hit the
   return key.  If the latter alternative is chosen, JED simply writes the
   buffer to the file already associated with the file.  Once the buffer is
   written to a file, the buffer becomes attached to that file.
   
   
@@Buffer Name and File Name Completion

   When JED prompts for a file name or a buffer name, the space bar and the
   TAB keys are special.  Hitting the TAB key will complete the name that is
   currently in the minibuffer up until it is no longer unique.  At that
   point, you can either enter more characters to complete the name or hit
   the space bar to cycle among the possible completions.
   
@Basic Editing

   Editing with JED is pretty easy--- most keys simply insert themselves.
   Movement around the buffer is usually done using the arrow keys or page
   up and down keys.  If edt.sl is loaded, the keypads on VTxxx terminals
   are setup as well.  Here I am just going to hit the highlights.  I do not
   consider cut/paste operations as ``highlights''. In the following, `^[`
   denotes the Escape key.  On keyboards without an explicit Escape key,
   Control-[ will most likely work.

         ^[Q  : reformat paragraph (wrap mode)
	 ^[N  : narrow paragraph (wrap mode)
	 ^[;  : Make Language comment (Fortran and C)
	 ^[\  : Trim whitespace around point
	 ^[!  : Execute shell command
	 ^[$  : Ispell word (unix)
	 ^X?  : Show line/column information
	 `    : (backquote) quoted_insert--- insert next char as is
	 ^[s  : center line
	 ^[u  : upcase word
	 ^[d  : downcase word
	 ^[c  : capitalize word
	 ^[x  : get JED> minibuffer prompt
	 ^X^B : pop up a list of buffers
	 ^Xs  : save some buffers
	 ^[.  : find tag (unix ctags compatable)
	 ^@   : (also control spacebar on some terminals) set mark

@@Marking Text (Point and Mark)

   Many commands work on certain regions of text.  A region is defined by
   the `Point' and the `Mark'.  The `Point' is the location of the current
   editing point or cursor position.  The `Mark' is the location of a mark.
   The mark is set using the "set_mark_cmd" which is bound to Control-@.
   (Control-2 or Control-Space on some keyboards).  When the mark is set,
   the `m' mark indicator should appear on the status line.  This indicates
   that a region is being defined.  Moving the cursor (Point) defines the
   other end of a region.  Many editors will highlight the region as it is
   marked.  I have not added this to JED since such a feature complicates
   the display code without contributing any useful functionality.  Of
   course this is only my opinion and is open for debate.

   It is easy to see where the location of the mark is by using the
   "exchange" command which is bound to ^X^X (Control-X Control-X).  This
   simply exchanges the Point and the Mark.  The region is still intact
   since it is defined only by the Point and Mark.  Pressing ^X^X again
   restores the mark and Point back to their original locations.
 
@@Tab Issues.

   Strictly speaking, JED uses only fixed column tabs whose size is
   determined by the value of the TAB variable.  The default is 8 which
   corresponds to eight column tabs.  Setting the TAB variable to 0 causes
   JED to not use tabs as whitespace and to display tabs as ^I. Please note
   that changing the tab settings on the terminal will have no effect as far
   as JED is concerned.

   JED is able to ``simulate'' arbitrary tabs as well through the use of
   user defined tab stops.  Calling the function `edit_tab_stops' allows the
   user to interactively set the tab stops.  That is, simply press ESCAPE-X
   to get the `JED>' prompt and enter `edit_tab_stops'.  A window will pop
   open displaying the current tab settings.  To add a tab stop, simply
   place a `T' in the appropriate column.  Use the space bar to remove a tab
   stop.

   Here I will argue that simulated tabs are better than real tab stops.
   First, consider what a really tab is.  A ``tab'' in a file is nothing
   more than a character whose ASCII value is 9.  For this reason, one also
   denotes a tab as ^I (control-I).  Unlike most other ASCII characters, the
   effect of the tab character is device dependent and is controlled through
   the device tab settings.  Hence, a file which displays one way on one
   device may look totally different on another device if the tab settings
   do not correspond.  For this reason, many people avoid tabs altogether
   and others adopt ``standard'' of eight column tabs.  Even though people
   always argue about what the correct tab settings should be, it must be
   kept in mind that this is primarily a human issue and not a machine
   issue.

   On a device employing tab stops, a tab will cause the cursor to jump to
   the position of the next tab stop.  Now consider the effect of changing
   the tab settings.  In one part of a document, text may have been entered
   using the first setting and in another part, the second setting was used.
   When moving from the part of the document where the current tab setting
   is appropriate to the part where the other tab setting was in effect will
   cause the document to look unformatted unless the appropriate tab
   settings are restored.  Wordprocessors store the tab settings in the file
   with the text so that the tabs may be dynamically changed to eliminate
   such unwanted bahavior.  However, text editors such as jed, vi, emacs,
   edt, eve (tpu), etc, do not store this information in the file. JED
   avoids this problem by using simulated tabs.  When using simulated tabs,
   tabs are not really used at all. Rather JED inserts the appropriate
   number of spaces to achieve the desired effect.  This also has the
   advantage of being able to cut and paste from the part of a document
   using one tab setting to another part with a different tab setting.  This
   simple operation may lead to unwanted results on some wordprocessors as
   well as those text editors using real tab stops.

@@Searching

   JED currently has two kinds of searches: ordinary searches and
   incremental searches.  Both types of searches have forward and backward
   versions.  The actual functions for binding purposes are:

		      search_forward, search_backward,
		      isearch_forward, isearch_backward.

   There is also the `occur' function which finds all occurances of a single
   word (string).  This function as no backwards version. By default it is
   not bound to any keys so to use it, `occur' must be entered at the `JED>'
   prompt (Escape-X) or you may bind it to a key.

   In the following I only discuss the incremental search.

   The default type of search in emacs in the incremental search. However,
   since I rarely ever use this type of search, I have made the the
   ``ordinary'' search the default.  Hence, if you want the traditional
   emacs keybinding, you will have to bind it yourself.

   As the name suggests, an incremental search performs a search
   incrementally.  That is, as you enter the search string, the editor
   begins searching right away.  For example, suppose you wish to search for
   the string `apple'.  A soon as the letter `a' is entered into the
   incremental search prompt, JED will search for the first occurance of
   `a'. Then as soon as the `p' is entered, JED will search from the current
   point for the string `ap', etc... This way, one may be able to quickly
   locate the desired string with only a minimal amount of information.

   Unlike the ``ordinary'' search, the incremental search is not terminated
   with the RETURN (^M) key.  Hitting the RETURN key causes JED to search
   for the next occurance of the string based on the data currently entered
   at the prompt.  The search is terminated with the ESCAPE (^[) key.

   Finally, the DELETE (^?) key is used to erase the last character entered
   at the search prompt.  In addition to erasing the last character of the
   search string, JED will return back to the location of the previous
   match. Erasing all characters will cause the editor to return to the
   place where the search began.  Like many things, this is one of those
   that is easier to do than explain.  Feel free to play around with it.

@@Rectangles

   JED has builtin support for the editing of rectangles.  One corner of
   rectangle is defined by setting the mark somewhere in the text.  The
   Point (cursor location) defines the opposite corner of the rectangle.
   
   Once a rectangle is defined, one may use the following functions:
   
      kill_rect:  Delete text inside the rectangle saving the rectangle 
         in the internal rectangle buffer.  
      open_rect:  Push all text in the rectangle to the right outside the 
         rectangle.
      copy_rect:  Copy text inside the rectangle to the internal rectangle
         buffer.
      blank_rect: Replace all text inside the rectangle by spaces.
      
   The function `insert_rect' inserts a previously killed or copied
   rectangle into the text at the Point.  
   
   These functions have no default binding and must be entered into the
   MiniBuffer at the JED prompt.  Pressing Escape-X will produce the `JED>'
   prompt.  Enter the desired function at this point.
   
@Modes

   Jed supports two internal modes as well as user defined modes.  The two
   internal modes consist of a ``C'' mode for C Language programming and a
   ``Wrap'' mode for ordinary text editing.  Examples of user defined modes
   are Fortran mode and DCL mode.
   
@@Wrap Mode

   In this mode, text is wrapped at the column given by the WRAP variable.
   The default is 78.  The text does not wrap until the cursor goes beyond
   the wrap column and a space is inserted.

@@@Formatting paragraphs:

   Paragraphs delimiters are: blank lines, lines that have a percent
   character, `%', or a line that has a backslash character `\' in the first
   column.  I do most of my ``word processing'' using TeX or LaTeX and this
   definition is ideally suited for this.  However,  it is possible for the
   user to change this definition.  See the the discussion of the hook
   `is_paragraph_separator' in the section on Hooks for details.
   
   The paragraph is formatted according to the indentation of the current
   line.  If the current line is indented, the paragraph will be given the
   same indentation.   This paragraph was formatted in this manner.  The
   default binding for this function is "^[q" (escape-q).
   
   In addition, a paragraph may be ``narrowed'' by the ``narrow_paragraph''
   function which is bound to "^[n" by default.  This differs from the
   ordinary ``format paragraph'' described above in that the right margin is
   reduced by an amount equal to the indentation of the current line. For
   example:

              This ``paragraph is the result of using the
	      function ``format_paragraph''.  Note how the
	      right margin is less here than in the above
	      paragraph.

@@``Smart'' Quotes

   You have probably noticed that many key words in this document are quoted
   in double quotes like ``this is double quoted'' and `this is single
   quoted'.  By default, the double quote key (") and single quotes key (')
   is bound to the function "text_smart_quote".  With this binding and in
   wrap mode, the single quote key inserts a single quote with the
   ``proper'' orientation and the double quote key inserts two single quotes
   of the ``proper'' direction.  To turn this off, rebind the keys to
   "self_insert_cmd".  Some modes already do this (e.g., EDT).  
   
   This brings up te question: if the double quote keys are bound to
   "text_smart_quote", then how does one insert the character (")?  The most
   common way is to use the "quoted_insert" function which is bound to the
   single backquote (`) key by default.  This is the same mechanism that
   control characters are inserted.  The other method is just the fact that
   if the preceeding character is a backslash `\', the character simply self
   inserts. 

@@C Mode

   C Mode facilitates the editing of C files.  Much of the latter part of
   the development of the JED editor was done using this mode.  This mode
   may be customized by a judicious choice of the variables C_INDENT and
   C_BRACE as well as the bindings of the curly brace keys `{}'. Experiment
   to find what you like or write your own using the S-Lang interface.
   
   By default, the return key is bound to the function `newline_and_indent'.
   This does what its name suggests:  inserts a newline and indents.  Again,
   some modes may rebind this key.  In addition, the keys `{`, `}', and TAB
   are also special in this mode.  The TAB indents the current line and the
   `{` and `}' keys insert themselves and reindent.  If you do not like it,
   simply rebind them to "self_insert_cmd".

@@Fortran Mode
   
   Fortran Mode is written entirely in S-Lang and is designed to facilitate
   the writing of Fortran programs.  It feaatures automatic indenting of
   Fortran code as well as automatic placement of Fortran statement Labels.
   
   In this mode, the keys `0'-'9' are bound to a function `for_elebel' which
   does the following:

     1. Inserts the calling character (0-9) into the buffer.
     2. If the character is preceded by only other digit characters, it
        assumes the character is for a label and moves it to the appropriate
	position.
     3. Reindents the line.
     
   This function is very similar to the one Emacs uses for labels.

@KeyBoard Macros

   JED is able to record a series of keystrokes from the terminal and replay
   them.  The saved series of keystrokes is known as a keyboard macro.  To
   begin a keyboard macro, simply enter the begin keyboard macro key
   sequence which is bound to ^X( if emacs.sl is loaded or ^K( if not.  To
   stop recording the keystrokes, enter ^X) if using emacs emulation or ^K)
   otherwise.  Then to ``execute'' the macro, press ^Xe if emacs or ^Kx if
   not.  Please note that it is illegal to execute a macro while defining
   one and doing so generates an error.  A macro can be aborted at anytime
   by pressing the Control-G key (^G).

   One nice feature JED includes is the ``macro query'' function.  That is,
   while defining a macro, the key sequence ^Xq will cause JED to issue the
   prompt `Enter String:' in the minibuffer.  Any string that is entered
   will be inserted into the buffer and the process of defining the macro
   continues.  Every time the macro is executed, JED will prompt for a NEW
   string to be inserted.
   
   Any time an error is generated, the process of defining the macro is
   aborted as well as execution of the macro.  This is very useful and I
   exploit it often.  For example, suppose you want to trim excess
   whitespace from the end of ALL lines in a buffer.  Let us also suppose
   that the number of lines in the buffer is less than 32000.  Then consider
   the following keystrokes:
   
        ^X(			       ; begin macro
	^E			       ; go end of line
	^[\			       ; trim whitespace (escape \)
	DOWN ARROW		       ; go down one line
	^X)			       ; end macro definition
	
   Now the macro has been defined.  So move to the top of the buffer and
   execute it 32000 times:
   
        ^[<			       ; top of buffer (escape < )
	^[32000			       ; repeat next command 32000 times
	^Xe			       ; execute macro
	
   If the buffer has less than 32000 lines, the end of the buffer will be
   reached and an error will be generated aborting macro execution.  

@Shells and Shell Commands

   The default binding to execute a shell coammnd and pump the output to a
   buffer is "^[!" (escape !).  JED will prompt for a command line and spawn
   a subprocess for its execution.

   Strictly speaking, JED does not support interactive subprocesses.
   However, I have written one in S-Lang which ``emulates'' such a
   subprocess.  It may invoked by typing `shell' at the `JED>' minibuffer
   prompt.  A window will be created with a buffer named "*shell*" attached
   to it.  Any text entered at the system dependent shell prompt will be
   executed in a subprocess and the result stuffed back in the shell buffer.
   Don't try to execute any commands which try to take over the keyboard or
   the screen or something undesirable may happen.  Examples of types of
   stupid commands are spawning other editors, logging in to remote systems,
   etc...  Even `chdir' is stupid since its effect is not permanent.  That
   is, 
        > cd ..
	> dir
   will not do what might naively be expected.  That is, the two commands
   above are not equivalent to the single command `dir ..'.
   
@Getting Help:

   JED's help functions are bound to ^H by default.  For example, ^HC will
   show what function the key carries out, ^HM will get a man page, ^HF will
   give help on a particular S-Lang function, etc...  However, some modes
   use the ^H key for something else.  For example, if EDT mode is in
   effect, then ^H may be bound to `bol' which causes the cursor to move to
   the beginning of the line.  See the section on EDT for more information.
   
   At some point, I will write up a manual for JED.  However, it will be
   awhile because JED is still very young (I began writing it in July of
   1992) and is still evolving.

@Extending JED

   To extend JED, it is necessary to become familiar with the S-Lang
   programming language.  S-Lang not a standalone programming language like
   C, Pascal, etc... Rather it is meant to be embedded into a C program.
   The S-Lang programming language itself provides only arithmetic, looping,
   and branching constructs.  In addition, it defines a few other other
   primitive operations on its data structures.  It is up to the application
   to define other builtin operations taylored to the application.  That is
   what has been done here for JED.  See the file slang.txt for S-Lang
   basics and custom.jed for functions JED has added to the language.  In
   any case, look at the *.sl files for explicit examples.

@Miscellaneous:

@@Abort Character
   The control G key is special and should not be rebound.  On the IBMPC,
   the keyboard interrupt 0x09 is hooked and a quit condition is signaled
   when it is pressed.  For this reason, it cannot used in any keybindings.
   A similar statement holds for the other systems.

@@Display Sizes
   On VMS and unix systems, the screen size may be changed to either 80 or
   132 columns by using the functions `w80' and `w132', respectively. Simply
   enter the appropriate functiona name at the `JED>' prompt in the
   minibuffer.  The default binding for access to the minibuffer is
   ESCAPE-X.
   
   On the PC, at this time the screen size cannot be changed while JED is
   running.  Instead it is necessary to exit the JED first then set the
   display size and rerun JED.  Still, this may not give the desired result
   since JED does not recognize all video modes.  For the latter case, it
   maybe necessary to use the environment variables `_rows' and `_columns'
   which JED checks for upon startup.  For example, if you want to use JED
   in 132 columns by 44 rows, it may be necessary to type:
   
			      set _columns=132
			      set _rows=44

   before running JED. 

@@Hooks

   A hook is a user defined function that JED calls under certain conditions
   which allow the user to modify the action.  For example, when JED starts
   up it looks for the existence of a user defined function
   `command_line_hook'.  If this function exists, JED puts the command line
   arguments on the S-Lang stack and calls the function. What the function
   does with the arguments is completely arbitrary and is left to the
   descretion of the user.  The startup file, `site.sl', defines such a
   function which reads in the files listed in the command line.  It is also
   this function which loads the jed.rc startup file.  Unlike the other
   hooks, this one must be present in the file site.sl since it is the only
   files loaded before calling the hook.
   
   After the startup files are loaded, JED then calls the hook
   `jed_startup_hook' immediately before entering the main editor loop.
   This hook is useful to modify certain data structures which may not have
   existed when the startup files were loaded.
   
   In addition to the above hooks, JED currently looks for:
   
     suspend_hook  --- function to be executed before suspending
     resume_hook   --- function that gets carried out after suspension
     exit_hook     --- gets executed before exiting JED 
 
   See site.sl for explicit examples of the above hooks.  

   Another useful hook is `is_paragraph_separator'.  This hook is called
   when JED searches for the beginning or end of a paragraph.  This search
   is performed by all paragraph formatting functions as well as the forward
   and backward paragraph movement commands. As JED performs the search, it
   moves from one line to another testing the line to see if it separates a
   paragraph.  It is the function of the hook to make this decision and
   return a zero if the line does not separate paragraphs and a one if it
   does. The default value of this hook may be written in S-Lang as

     ( bol
       "\\" looking_at {1 return} if
       "%"  looking_at {1 return} if
       skip_white eolp
     ) is_paragraph_separator

