From 3d85f4014ce7cfdc9e537adf768c4b6ab4ebc8db Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Sat, 18 Oct 2014 13:36:55 -0400 Subject: [PATCH 1/2] Have tuareg mode set the compile command to utilize corebuild via opam --- modules/prelude-ocaml.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/prelude-ocaml.el b/modules/prelude-ocaml.el index 2514a00..54f2dc2 100644 --- a/modules/prelude-ocaml.el +++ b/modules/prelude-ocaml.el @@ -49,7 +49,9 @@ (add-hook 'tuareg-mode-hook (lambda () (progn (define-key tuareg-mode-map (kbd "C-c C-s") - 'utop)))) + 'utop) + (setq compile-command + "opam config exec \"corebuild \"")))) ;; Setup merlin completions company is used by default in prelude (add-to-list 'company-backends 'merlin-company-backend) From 350504521aa77efd10dcdd9d6b2ad60cdd69a724 Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Fri, 24 Oct 2014 14:30:22 -0400 Subject: [PATCH 2/2] Improve ocaml module documentation Add some documentation about environment assumptions, and correct some grammar issues. --- modules/prelude-ocaml.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/prelude-ocaml.el b/modules/prelude-ocaml.el index 54f2dc2..68df75c 100644 --- a/modules/prelude-ocaml.el +++ b/modules/prelude-ocaml.el @@ -13,6 +13,23 @@ ;; tuareg is the preferred ocaml mode for Emacs +;; These setups for ocaml assume that you are using the OPAM package +;; manager (http://opam.ocaml.org/). + +;; Because of the apparent complexity of getting emacs environment +;; variables setup to use opam correctly, it is instead easier to use +;; opam itself to execute any necessary commands. + +;; Also, the standard OCaml toplevel usage has been replaced in favor +;; of UTOP, the universal toplevel, and we assume that you are using +;; the Jane Street Core libraries rather than the regular OCaml +;; standard libraries + +;; The minimum required setup for using Prelude's OCaml setup would be +;; to install OPAM, and then, minimally `opam install core utop'. A +;; good getting started guide is available at +;; https://github.com/realworldocaml/book/wiki/Installation-Instructions + ;;; License: ;; This program is free software; you can redistribute it and/or @@ -56,7 +73,7 @@ ;; Setup merlin completions company is used by default in prelude (add-to-list 'company-backends 'merlin-company-backend) -;; But merlin also offers support for autocomplete, uncomment this next line +;; Merlin also offers support for autocomplete, uncomment this next line ;; to activate it. ;; (setq merlin-use-auto-complete-mode t)