Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005455OCamlOCaml documentationpublic2011-12-29 14:242011-12-29 23:11
Reporterdbuenzli 
Assigned To 
PrioritylowSeveritytweakReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version3.13.0+dev 
Summary0005455: .emacs instructions, add lines to recognize ocaml scripts
DescriptionThe 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

Best,

Daniel

--- 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
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0006557)
doligez (administrator)
2011-12-29 23:11

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

-- Damien

- Issue History
Date Modified Username Field Change
2011-12-29 14:24 dbuenzli New Issue
2011-12-29 23:11 doligez Note Added: 0006557
2011-12-29 23:11 doligez Status new => closed
2011-12-29 23:11 doligez Resolution open => fixed
2011-12-29 23:11 doligez Fixed in Version => 3.13.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker