From 6bbcd438ae36739703a4fea16be933c76b70aa73 Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Mon, 4 Aug 2014 15:15:40 -0700 Subject: [PATCH 1/2] Remove unnecessary autoload call --- modules/prelude-ocaml.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/prelude-ocaml.el b/modules/prelude-ocaml.el index a9254fa..e92205e 100644 --- a/modules/prelude-ocaml.el +++ b/modules/prelude-ocaml.el @@ -43,8 +43,6 @@ ("\\.topml\\'" . tuareg-mode)) auto-mode-alist)) -(autoload 'utop-setup-ocaml-buffer "utop" "Toplevel for OCaml" t) - (add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer) (add-hook 'tuareg-mode-hook 'merlin-mode) From 17d56f668da853bfa55688ea7a013e550bc3a867 Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Mon, 4 Aug 2014 15:44:20 -0700 Subject: [PATCH 2/2] Redefine C-c C-s to run utop Instead of tuareg-run-ocaml. This avoids the problems described in issue #626. Nominally fixes #626. --- modules/prelude-ocaml.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/prelude-ocaml.el b/modules/prelude-ocaml.el index e92205e..2514a00 100644 --- a/modules/prelude-ocaml.el +++ b/modules/prelude-ocaml.el @@ -46,6 +46,11 @@ (add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer) (add-hook 'tuareg-mode-hook 'merlin-mode) +(add-hook 'tuareg-mode-hook (lambda () + (progn + (define-key tuareg-mode-map (kbd "C-c C-s") + 'utop)))) + ;; Setup merlin completions company is used by default in prelude (add-to-list 'company-backends 'merlin-company-backend)