Frequently Asked Questions about the JED editor.

To find the answer to one of the following questions,  Search for the number
enclosed in <>, e.g., <3> for question 3.

Frequently asked questions:

1. How do I obtain JED?  (ftp and email)
2. How do I disable JED's C mode.
3. How do I get JED to highlight a region as I define it?
4. How do I turn on wrap mode or turn it off?
5. What is the difference between internal and intrinsic functions?

<1> How do I obtain JED? (ftp and email)

   JED is available via anonymous ftp from amy.tch.harvard.edu
   (134.174.22.100) in the pub/jed directory.  JED comes in three forms:
        
	 jedxxx.tar.Z     unix distribution for version xxx
	 jedxxx.*_of_n    n part VMS share distribution for xxx
	 jedxxx.zip       PC distribution with precompiled jed.exe
	 
   All distributions are identical except that the zip file also contains a
   precompiled executable for PC systems.
   
   JED may also be obtained by email for those without ftp access.  To learn
   about how to ftp using email, send email to ftpmail@pa.dec.com with the
   single line `help'.  A message will be returned with instructions.
   For those on BITNET, particularly with VMS systems, Hunter Goatley has
   made JED available via email:

       To get JED via e-mail, send the following commands in the body
       of a mail message to FILESERV@WKUVX1.BITNET:

       SEND JED090
       SEND FILESERV_TOOLS  !Only needed if you don't have UNZIP and MFTU

       You can also get it via anonymous ftp from ftp.spc.edu in
       [.MACRO32.SAVESETS]JED090.ZIP.

       This distribution includes VMS .OBJs and a .EXE file that was
       linked under VMS V5.1.  [Note that although this distribution
       is intended for VMS systems, it includes makefiles and sources
       for unix as well.  However, you will need to get unzip for
       your unix system. --John]

<2> How do I disable JED's C mode.

   The startup file `site.sl' contains the function `mode_hook' which is 
   called whenever a file is loaded.  This function is passed the filename
   extension.  If a file with `c' or `h' extension is read, this function
   will turn on C-mode for that buffer.  You could modify this function to
   not select C-mode.  However, this is not recommended.  Rather, it is
   recommended that you simply rebind the offending keybinding.  These
   include: `{`, `}`, the TAB key, and the RETURN key.
   
   Simply put any or all of:
   
      "self_insert_cmd"  "{"   setkey 
      "self_insert_cmd"  "}"   setkey
      "self_insert_cmd"  "^I"  setkey
      "newline"          "^M"  setkey
      
   in your personal startup file (jed.rc or .jedrc).
   
<3> How do I get JED to highlight a region as I define it?

   At present, you cannot.  Rather, JED displays an `m' on the left part of
   the status line to indicate that the mark has been set and a region is
   being defined.  The region extends from the place where the mark was set
   (``The Mark'') to the current cursor position (``The Point'').  Hence, a
   region is defined by the Point and Mark.
   
   Highlighting a region simply indicates where the Point and Mark are.  You
   already know where the Point is: cursor position.  If you cannot remember
   where the Mark is, use the function `exchange' which has the default
   binding of Control-X Control-X.  This function simply exchanges the Point
   and Mark.  That it, it moves the cursor position to where the Mark was
   placed and moves the Mark to where the cursor was.  Hence, the region is
   still intact.  Unlike editors which highlight, this give you the ability
   to change the location of BOTH ends of a region.
   
<4> How do I turn on wrap mode or turn it off?

   Normally, this is done automatically when JED loads a file with extensions
   .txt, .doc, etc...  See question 2 for a discussion of how this is done.
   To turn on wrap mode for the current buffer, simply press Escape-X and 
   enter:
           text_mode
	
   at the JED prompt.  To turn it off, you must change the mode to something
   else.  A fairly generic choice is the `no_mode' mode.  To do this, press
   Escape-X and enter:
   
           no_mode
	   
   At the JED prompt.  It is easy to write a function to toggle the mode for
   you that can be bound to a key.  This one (toggle_wrapmode) will work:
   
     ( 
       [n]
       whatmode =n
       n 1 &          ; test wrap bit
         { n 1 ~ &}   ; wrap bit on so mask it off
	 { n 1 | }    ; wrap bit off so set it.
       else
       setmode
     ) toggle_wrapmode

<5> What is the difference between internal and intrinsic functions?

   An intrinsic function is a function that is directly callable from S-Lang
   while an internal function cannot.  However, internal functions can be
   called indirectly through the use of the intrinsic function `call'.  For
   example, consider the internal function `self_insert_cmd'.  Most typing
   keys are bound to this function and cause the key to be directly inserted
   into the buffer.  Consider the effect of this.  After a character to be
   inserted is received by JED, the buffer is updated to reflect its
   insertion. Then the screen is updated.  Here lies the essential
   difference between the two types of functions.  If the screen was in sync
   before the insertion, JED can simply put the terminal in insert mode,
   send out the character and take the terminal back out of insert mode. 
   However, this requires knowing the state of the screen.  If called from a
   S-Lang routine, all bets are off.  Since the screen update is not
   performed until after any S-Lang function has returned to JED, the buffer
   and the screen will almost always be out of sync with respect to one
   another and a full screen update will have to be performed.  But this is
   very costly to have to do for every insertion.  Hence, JED makes a
   distinction between the two types of functions by making the most common
   ones internal.  The upshot is this: intrinsic functions will cause a full
   screen update while internal ones may not.
   
