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.
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
sample.el Sample file to check the indentation engine.
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:
(add-to-list 'load-path "foo")
You can also do
$ make install DEST=foo
which will also byte-compile the files.
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 Emacs to load Tuareg and Sym-Lock (for XEmacs) automatically.
Consider updating your `.emacs' configuration file by hand if you
keep on using Tuareg.
Add the following lines to your .emacs file:
(add-to-list 'auto-mode-alist '("\\.ml[iylp]?" . tuareg-mode))
(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, and .mlp or manually by M-x tuareg-mode. It
gives you the correct syntax table for the Caml language.
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.
The standard Emacs customization tool can be used to configure
Tuareg options. It is available from the Options menu and Tuareg's
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:
'(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.
Ian Zimmerman for the previous mode, compilation interface and
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
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
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.
Tuareg mode have been maintained by Albert Cohen until version 1.45.
Jane Street took over maintenance based on Albert Cohen's version 1.46
(later retracted by him), and released its first version as 2.0.
The official Tuareg home page is located at:
Bug reports & patches to: <firstname.lastname@example.org>
or use the tracker: <https://forge.ocamlcore.org/tracker/?group_id=43>.