Example Usage of expander facility
==================================

  Packaged is an almost trivial example of supporting a language (perl), which
  can be used to base other language support on. If you've successfully
  installed expander the expanader package, here's a little example of how you
  can use it.

  (There is an assumption made below that the expansion and next-field
   capabilities are bound to Ctrl-x and Ctrl-c, respectively.)

  (The alternative to the folowing paragraph is to define the environment
   variables EXP_USER, and EXP_EMAIL with your appropriate values.)
   
  Open a new window and select from the Macro menu, Dictionary>Edit
  Definitions. A new NEdit should be opened with the contents of the file
  pointed to by EXP_DEFINITIONS. Edit the 'me' definition in the file with your
  name. Edit the email definition too. Now save the changes and quit that NEdit
  window.

  Now set the language mode under Preferences to Perl. Type 'tpl' on the start
  of the first line, and then press Ctrl-x. The abbreviation is expanded with
  the contents of the template file that is installed in
  $EXPANDER_DIR/templates. Not only that, but the word 'description' should be
  selected, ready for you to overtype. Type 'sig' and press Ctrl-x again. There
  should be a signature in the place of the description, and the cursor now is
  where the |><| marker was, a little lower.

  Now type 'if' and press Ctrl-x another time. You should see an if test, with
  the word 'condition' selected. Type a condition, and press Ctrl-c. Now the
  word 'statement' in the block is selected, waiting for your input. Type
  something, and press Ctrl-c to go to the end of the block. Now type 'ef' and
  expand with Ctrl-x to get an 'elsif' block. Fill in the condition. Press
  Ctrl-c a couple of times to get to the end of the block (this movement only
  works when nothing is selected, so you may have to remove the selections by
  typing or by pressing delete). Now type 'el' and expand to finish the
  if-elsif-else structure.

  Go to the end of the file, type 'pod' and expand. You'll see an entire pod
  section in its place. Particularly note the AUTHOR section, where the
  signature appears again, thanks to autoexpansion.

  By now you'll have a fair idea of the possibilities of expander. To see what
  (un)box commenting can do, select a couple of lines of code, and press Alt-b
  The block should become commented. Select the entire comment block, and press
  shift-Alt-b to reverse the process.

  CUSTOMIZING

  If you're interested in expander and (un)box commenting, you'll definitely
  want to customize them to fit your needs. Here's how to go about that.

  There are a couple of files that you must create or edit to get specific
  things done:

  $EXPANDER_DEF/definitions
  
      here you enter global expander definitions, and include various language
      specific files. For the formatting of this file, see expander.doc.

  $EXPANDER_DEF/*.def
  
      these are language specific expander definition files, with the same
      format as the definitions file. Of course, if you desire a different
      extension on the files, make sure to define EXP_EXTENT with the pattern.
      (eg. setenv EXP_EXTENT ".ex")

  $EXPANDER_DIR/services
  
      this is a file that is read by the NEdit expander_init macro, and sets
      language specific information for calls to expander and (un)boxcomment.
      Languages are specified as a colon separated line, as specified in the
      comment at the top of the file. Note that the first field is the name of
      the language as NEdit knows it (see the language mode menu), while the
      last is the name of the expander definition file for that language,
      without the .def extension. (See NEdit-expander.doc)

  The easiest way of editing the definition files is by selecting that option
  from the Expander macro menu. If you do that from a window in a language mode
  known to expander, you'll get the correct abbreviation dictionary.
  Otherwise, the global definitions file is opened. Make sure to import the
  Expander highlight patterns, which will make your life a little bit easier.

  The boxcomment behavior is modified with the remaining fields in the services
  file. It's best to experiment a little to get the results you want.

  After modifying the services file, the Expander macro menu entry 'Reset
  Language Services' should be called to make the changes effective in the
  current NEdit server session.
