check that tuareg-run-caml is defined before use

* lisp/ob-ocaml.el (org-babel-prep-session:ocaml): Check that
  tuareg-run-caml is defined before use.
  (tuareg-run-ocaml): Declared for compiler.
This commit is contained in:
Eric Schulte 2013-02-09 09:11:57 -07:00
parent f3be2ae163
commit 7b62ae77b3
1 changed files with 4 additions and 2 deletions

View File

@ -40,6 +40,7 @@
(eval-when-compile (require 'cl))
(declare-function tuareg-run-caml "ext:tuareg" ())
(declare-function tuareg-run-ocaml "ext:tuareg" ())
(declare-function tuareg-interactive-send-input "ext:tuareg" ())
(defvar org-babel-tangle-lang-exts)
@ -88,8 +89,9 @@
(stringp session))
session
tuareg-interactive-buffer-name)))
(save-window-excursion (tuareg-run-caml)
(get-buffer tuareg-interactive-buffer-name))))
(save-window-excursion
(if (fboundp 'tuareg-run-caml) (tuareg-run-caml) (tuareg-run-ocaml))
(get-buffer tuareg-interactive-buffer-name))))
(defun org-babel-variable-assignments:ocaml (params)
"Return list of ocaml statements assigning the block's variables."