DESCRIPTION:

This archive contains files to help editing Caml code, to hilight
important parts of the code, to run a Caml toplevel, and to run the
Caml debugger within GNU Emacs/XEmacs editors. It is designed for
Objective Caml but handles Camllight syntax as well.

CONTENTS:

  README             This file.
  HISTORY            Differences with previous versions.
  tuareg.el          A major mode for editing Tuareg code in Emacs/XEmacs.
  sym-lock.el        An extension to XEmacs Font-Lock for symbol fontifying.
  camldebug.el       To run the Caml debugger under Emacs.
  append-tuareg.el   Configuration file for quick installation
  custom-tuareg.el   Tuareg customization example

INSTALL:

  If you have the right to put files in Emacs / XEmacs `site-lisp'
  directory, you only have to copy the `tuareg.el', `camldebug.el'
  and `sym-lock.el' files in it (Sym-Lock works with XEmacs only).

  Otherwise, choose a directory, e.g., `foo'. Copy the `tuareg.el'
  `camldebug.el' and `sym-lock.el' files in it (Sym-Lock works with
  XEmacs only). Then add the following line to your `.emacs', where
  `foo' is replaced by the appropriate directory FULL PATH:

  (setq load-path (cons "foo" load-path))

QUICK CONFIGURATION:

  If you are no Emacs-Lisp addict, and would like to use Tuareg
  NOW, append (or copy) `append-tuareg.el' file to your `.emacs'
  configuration file. It tells XEmacs to load Tuareg and Sym-Lock
  automatically.

  Consider updating your `.emacs' configuration file by hand if you
  keep on using Tuareg.

MANUAL CONFIGURATION:

  Add the following lines to your .emacs file:

  (setq auto-mode-alist (cons '("\\.ml\\w?" . tuareg-mode) auto-mode-alist))
  (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
  (autoload 'camldebug "camldebug" "Run the Caml debugger" t)

  The Tuareg major mode is triggered by visiting a file with extension
  .ml, .mli, .mly, .mll, .mlp... or manually by M-x tuareg-mode. It
  gives you the correct syntax table for the Caml language.

  If you use XEmacs, the Font-Lock minor-mode is used accordingly to
  your customization options.

  Within Emacs, you may want to use Font-Lock in addding the following
  lines to the configuration file:

  (if (and (boundp 'window-system) window-system)
      (require 'font-lock))

  Within XEmacs (more generally, if you have variable-sized fonts and
  `atomic-extents' library supported) you may also want to use
  Sym-Lock Warning: MULE (multilingual) versions of XEmacs do not
  support multiple font encodings in a single buffer, which is
  required by Sym-Lock. Configuring Tuareg with Sym-Lock is done as
  follows:

  (if (and (boundp 'window-system) window-system)
      (when (string-match "XEmacs" emacs-version)
       	  (if (not (and (boundp 'mule-x-win-initted) mule-x-win-initted))
              (require 'sym-lock))
       	  (require 'font-lock)))

USAGE:

  Tuareg allows you to run batch Caml compilations from Emacs (using
  M-x compile) and browse the errors (C-x `). Typing C-x ` sets the
  point at the beginning of the erroneous program fragment, and the
  mark at the end. Under Emacs, the program fragment is temporarily
  hilighted.

  M-x tuareg-run-caml starts a Caml toplevel with input and output in
  an Emacs buffer named `*caml-toplevel*. This gives you the full
  power of Emacs to edit the input to the Caml toplevel. This mode is
  based on comint so you get all the usual comint features, including
  command history. A hook named `tuareg-interactive-mode-hook' may be
  used for customization.

  Typing C-c C-e in a buffer in Caml mode sends the current phrase
  (containing the point) to the Caml toplevel, and evaluates it. If
  you type one of these commands before M-x tuareg-run-caml, the
  toplevel will be started automatically.

  M-x camldebug FILE starts the Caml debugger camldebug on the
  executable FILE, with input and output in an Emacs buffer named
  *camldebug-FILE*. It is similar to April 1996 version, with minor
  changes to support XEmacs, Tuareg and OCaml. Furthermore, package
  `thingatpt' is not required any more.

CUSTOMIZATION

  The standard Emacs customization tool can be used to configure
  Tuareg options. It is available from the Options menu and Tuareg's
  Customize sub-menu.

  You may also customize the appearance of Caml code by twiddling the
  variables listed at the start of tuareg.el (preferably using
  `tuareg-mode-hook', you should not patch the file directly). You
  should then add to your configuration file something like: (add-hook
  'tuareg-mode-hook '(lambda () ... ; your customization code ))

  `custom-tuareg.el' is a sample customization file for standard
  changes. You can append it to your `.emacs' or use it as a tutorial.

FEATURES, KNOWN BUGS:

  Cf. online help.

THANKS:

  Ian Zimmerman for the previous mode, compilation interface and
  debugger enhancement.

  Jacques Garrigue enhanced Zimmerman's mode along with an adaptation
  to Objective Caml (and Labl) syntax. Although this work was
  performed independently, his useful test file and comments were of
  great help.

  Michel Quercia for excellent suggestions, patches, and helpful
  emacs-lisp contributions (full, ready-to-work implementations, I
  should say), especially for Tuareg interactive mode, and browser
  capacities.

  Denis Barthou, Pierre Boulet, Jean-Christophe Filliatre and Rémi
  Vanicat for intensive testing, useful suggestions, and help.

  Ralf Treinen for maintaining the Debian GNU/Linux package.

  Every people who sent me bug reports, suggestions, comments and
  patches. Nothing would have improved since version 0.9.2 without
  their help. Special thanks to Eli Barzilay, Josh Berdine, Christian
  Boos, Carsten Clasohm, Yann Coscoy, Prakash Countcham, Alvarado
  Cuihtlauac, Erwan David, Gilles Défourneaux, Philippe Esperet,
  Gilles Falcon, Tim Freeman, Alain Frisch, Christian Lindig, Claude
  Marché, Charles Martin, Dave Mason, Stefan Monnier, Toby Moth,
  Jean-Yves Moyen, Alex Ott, Christopher Quinn, Ohad Rodeh, Rauli
  Ruohonen, Hendrik Tews, Christophe Troestler, Joseph Sudish, Mattias
  Waldau and John Whitley.

REPORTING:

  The official Tuareg home page is located at:

  http://www-rocq.inria.fr/~acohen/tuareg

  Bug reports, suggestions, donations etc. to:

  Albert Cohen
  Research Scientist - INRIA Rocquencourt

  E-Mail     : Albert.Cohen@inria.fr
  WWW        : http://www-rocq.inria.fr/~acohen
