Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.emacs instructions, add lines to recognize ocaml scripts #5455

vicuna opened this issue Dec 29, 2011 · 1 comment

.emacs instructions, add lines to recognize ocaml scripts #5455

vicuna opened this issue Dec 29, 2011 · 1 comment


Copy link

@vicuna vicuna commented Dec 29, 2011

Original bug ID: 5455
Reporter: @dbuenzli
Status: closed (set by @damiendoligez on 2011-12-29T22:11:53Z)
Resolution: fixed
Priority: low
Severity: tweak
Version: 3.12.1
Fixed in version: 3.13.0+dev
Category: documentation
Monitored by: @dbuenzli

Bug description

The README of the emacs mode should also mention to add the two lines below to the .emacs. They allow to automatically invoke caml-mode when a source file starts with one of these lines :

#!/usr/local/bin/ocamlrun /usr/local/bin/ocaml
#!/usr/bin/env ocaml



--- ocaml-3.12.1/emacs/README.old 2011-12-29 14:06:28.000000000 +0100
+++ ocaml-3.12.1/emacs/README 2011-12-29 14:07:50.000000000 +0100
@@ -19,6 +19,8 @@
(cons '("\.ml[iylp]?$" . caml-mode) auto-mode-alist))
(autoload 'caml-mode "caml" "Major mode for editing Caml code." t)
(autoload 'run-caml "inf-caml" "Run an inferior Caml process." t)

  • (add-to-list 'interpreter-mode-alist '("ocamlrun" . caml-mode))
  • (add-to-list 'interpreter-mode-alist '("ocaml" . caml-mode))

I added camldebug.el from the original distribution, since there will
soon be a debugger for Objective Caml, but I do not know enough about

Copy link

@vicuna vicuna commented Dec 29, 2011

Comment author: @damiendoligez

Thanks for the suggestion and for the patch. Implemented in trunk.

-- Damien

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant