			   -*- Outline -*-

(Note: installation instructions can be found in file INSTALL)

* Introduction

This directory contains a *very primitive* version of a Funnel mode
for Emacs. This version currently supports:

1. syntactic highlighting,

2. basic communication with an inferior Funnel interpreter (e.g.
   funny),

3. very primitive indentation support.

Note that the syntax supported by this mode is a possible future
version of the Funnel syntax, but it has enough similarities with the
current syntax for this mode to be useful :-).

One important aspect of this syntax is that all function arguments
have to appear inside of parenthesis. Therefore, if you want syntax
highlighting to work properly even for untyped Funnel programs, you
should write

  def add (x) (y) = x + y

and not

  def add x y = x + y

* Indentation

Indentation of code is currently not completely automatic, like in
other modes in Emacs. Note that completely automatic indentation of
Funnel code is in general impossible, because indentation is
significant in blocks delimited with braces.

So, indentation works like that:

When typed at the beginning of a line, with no text (except maybe
spaces) afterwards on the line, TAB indents like the preceding
non-comment line---except when this line is the first of a
brace-delimited block, in which case it indents one step more.
Otherwise, the current line is simply reindented one step on the
right.

When typed at the beginning of a line, with no text (except maybe
spaces) afterwards on the line, M-TAB indents one step left of the
preceding non-comment line. Otherwise, the current line is simply
reindented one step on the left.

These rules might seem strange but they are supposed to give a
somewhat intuitive behavior to TAB and M-TAB. Just try them.

The size of the indentation step is given by the funnel-indent-step
variable, which can be customized.

* Inferior Funnel mode

You can run a Funnel interpreter in an Emacs buffer with the command
run-funnel. This works pretty much like the inferior mode for Scheme,
OCaml, etc.

* Misc

Funnel mode does not work with XEmacs yet.

If you find a bug that is not already mentioned in the BUGS file,
please use the bug-reporting function of the mode to signal it. If you
have suggestions that are not already mentioned in the TODO file,
please send them to Michel.Schinz@epfl.ch
