# Caml-Mode

> Caml mode for GNU Emacs

**Wikidata**: [Q114273323](https://www.wikidata.org/wiki/Q114273323)  
**Source**: https://4ort.xyz/entity/caml-mode

## Summary
Caml-Mode is an Emacs major mode and source-code editing package that provides editing support for the OCaml (Caml) programming language inside GNU Emacs and XEmacs. First created in 1993, it is implemented in Emacs Lisp, distributed under the GNU GPL (version 2 or later), and is available from the project's GitHub repository and the NonGNU ELPA archive.

## Key Facts
- Inception: 1993 (Caml-Mode was created in 1993).
- Purpose: Emacs mode / source code editor features for OCaml (Caml) programming in GNU Emacs and XEmacs.
- Programming language: implemented in Emacs Lisp.
- License: GNU General Public License, version 2.0 or later.
- Creators: Xavier Leroy and Jérôme Vouillon (listed as creators of caml-mode).
- Current maintainer: Christophe Troestler (maintained in the repository's caml.el).
- Distribution: part of NonGNU ELPA (start date 2020-11-21); distributed via the Emacs Lisp Package Archive.
- Stable releases: 4.7.1 (stable, 2020-11-21 / published 2020-12-15), 4.8 (stable, 2021-08-24), 4.9 (preferred stable, released 2021-09-07/08).
- Replaced as the widely used OCaml mode by Tuareg in 1997 (Tuareg is a separate OCaml Emacs mode).
- Packaging: Debian source package "caml-mode" (since 2019); Debian stable packages include "elpa-caml" and "ocaml-mode"; Gentoo package "app-emacs/ocaml-mode"; Ubuntu packages include "elpa-caml" and "ocaml-mode".
- Copyright holder (historical): Institut National de Recherche en Informatique et en Automatique (INRIA) from 1997 until 2017.

## FAQs
### Q: What is Caml-Mode?
A: Caml-Mode is an Emacs major mode written in Emacs Lisp that provides editing support for the OCaml (Caml) programming language inside GNU Emacs and XEmacs. It supplies language-aware editing features and is distributed under the GNU GPL.

### Q: Who created and maintains Caml-Mode?
A: Caml-Mode was created by Xavier Leroy and Jérôme Vouillon. It is currently maintained by Christophe Troestler (as reflected in the repository caml.el).

### Q: Where can I get Caml-Mode and which versions are current?
A: The source code repository is hosted at https://github.com/ocaml/caml-mode and the package is available from NonGNU ELPA (listed since 2020-11-21). Notable recent stable releases are 4.7.1 (2020-11-21/2020-12-15), 4.8 (2021-08-24), and 4.9 (preferred, released 2021-09-07/08).

### Q: Is Caml-Mode free to use and modify?
A: Yes. Caml-Mode is free software distributed under the GNU General Public License, version 2.0 or later, allowing running, studying, modifying and redistributing the code under GPL terms.

### Q: How does Caml-Mode relate to Tuareg?
A: Tuareg is a separate OCaml Emacs mode that emerged in 1997 and replaced Caml-Mode as the widely used OCaml mode; the two are different projects with overlapping goals.

## Why It Matters
Caml-Mode provides native OCaml editing support for Emacs users and has been part of the OCaml tooling landscape since 1993. As an Emacs Lisp package it integrates with the extensible Emacs environment to provide syntax-aware editing, indentation, and other language-specific conveniences, making OCaml development inside Emacs more productive. Its longevity and inclusion in distributions (Debian, Gentoo, Ubuntu) and archives (NonGNU ELPA, Emacs Lisp Package Archive) reflect continued utility for users preferring classic caml-mode behavior or simple, lightweight OCaml editing without the additional features of newer tools. Being free software under the GPL ensures it can be inspected and adapted by the community. Even though newer modes such as Tuareg supplanted it in popularity, Caml-Mode remains a maintained, cross-platform option for OCaml editing and is part of the historical evolution of OCaml tooling.

## Notable For
- Longstanding history: created in 1993 and part of the OCaml/Emacs ecosystem for decades.
- Emacs-native implementation: written in Emacs Lisp and directly usable in both GNU Emacs and XEmacs.
- Packaged and distributed: included in NonGNU ELPA since 2020-11-21 and available through common Linux distributions (Debian, Ubuntu, Gentoo).
- Free-software licensing: distributed under GNU GPL v2 or later.
- Historical transition point: was replaced as the dominant OCaml mode by Tuareg in 1997, marking a split in OCaml Emacs tooling.

## Body

### Overview
- Name: Caml-Mode (alias: emacs-caml).
- Function: Major mode and editing library for OCaml/Caml source code in Emacs environments.
- Platforms: GNU Emacs and XEmacs (cross-platform).
- Implementation language: Emacs Lisp.

### History
- Inception year: 1993.
- Early stewardship: originally associated with OCaml/Caml development and INRIA (INRIA held copyright 1997–2017).
- 1997: Tuareg appeared and replaced Caml-Mode as the widely used OCaml Emacs mode.
- 2020-11-21: Caml-Mode was made part of NonGNU ELPA; distributed via Emacs Lisp Package Archive from that time.

### Development & Maintainers
- Creators: Xavier Leroy and Jérôme Vouillon.
- Current maintainer (repository): Christophe Troestler (caml.el in the GitHub repository).
- Source code repository: https://github.com/ocaml/caml-mode.

### Versions & Releases
- 4.7.1: stable version with release dates 2020-11-21 (archive reference) and published announcement 2020-12-15.
- 4.8: stable version released 2021-08-24.
- 4.9: preferred stable release, released 2021-09-07/08.

### Distribution & Packaging
- Part of NonGNU ELPA (start_time 2020-11-21).
- Distributed via the Emacs Lisp Package Archive.
- Debian: source package "caml-mode" (since 2019); Debian stable packages include "elpa-caml" and "ocaml-mode".
- Gentoo package name: app-emacs/ocaml-mode.
- Ubuntu packages: elpa-caml and ocaml-mode.
- Guix variable name: emacs-caml.

### Licensing & Copyright
- License: GNU General Public License, version 2.0 or later.
- Copyright holder (historical): Institut National de Recherche en Informatique et en Automatique (INRIA) from 1997 until 2017.
- Copyright status: copyrighted.

### Related Projects
- Tuareg: a separate OCaml Emacs mode, REPL, and debugger for Emacs; it replaced Caml-Mode as the widely used OCaml mode in 1997 and is listed as different_from Caml-Mode.
- Emacs Lisp: Caml-Mode is implemented in the Emacs Lisp dialect used in GNU Emacs.

### Documentation & References
- Official repository / project page: https://github.com/ocaml/caml-mode.
- NonGNU ELPA package page: https://elpa.nongnu.org/nongnu/caml.html.
- Described at: EmacsWiki page https://www.emacswiki.org/emacs/CamlMode.

## Schema Markup
```json
{
  "@context": "https://schema.org",
  "@type": "Thing",
  "name": "Caml-Mode",
  "description": "An Emacs major mode that provides OCaml (Caml) source-code editing support for GNU Emacs and XEmacs, implemented in Emacs Lisp.",
  "url": "https://github.com/ocaml/caml-mode",
  "sameAs": [
    "https://github.com/ocaml/caml-mode",
    "https://elpa.nongnu.org/nongnu/caml.html",
    "https://www.emacswiki.org/emacs/CamlMode"
  ],
  "additionalType": "software library"
}

## References

1. [Source](https://github.com/ocaml/caml-mode/blob/master/caml.el)
2. [Source](https://github.com/ocaml/tuareg/blob/master/HISTORY)
3. [Source](https://sources.debian.org/src/caml-mode/4.06-2/caml.el/)
4. [Caml version 4.7.1. 2020](https://lists.gnu.org/archive/html/gnu-emacs-sources/2020-12/msg00016.html)
5. [Caml version 4.8. 2021](https://lists.gnu.org/archive/html/gnu-emacs-sources/2021-08/msg00067.html)
6. [Caml version 4.9. 2021](https://lists.gnu.org/archive/html/gnu-emacs-sources/2021-09/msg00007.html)
7. [Release 4.9. 2021](https://github.com/ocaml/caml-mode/releases/tag/4.9)
8. [Source](https://elpa.nongnu.org/nongnu/caml.html)
9. [Source](https://packages.debian.org/bookworm/elpa-caml)
10. [Source](https://packages.debian.org/bookworm/ocaml-mode)