summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2013-02-09 09:11:57 -0700
committerEric Schulte <schulte.eric@gmail.com>2013-02-09 14:11:45 -0700
commit7b62ae77b3bb70481ff0ebcdbf166e06b9ffec3b (patch)
tree9074633cf757c76f4695f1bc9d41519de92fac01
parentf3be2ae163d355b35bbf5e8fa2ff48956a0ba8ec (diff)
downloadorg-mode-7b62ae77b3bb70481ff0ebcdbf166e06b9ffec3b.tar.gz
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.
-rw-r--r--lisp/ob-ocaml.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/ob-ocaml.el b/lisp/ob-ocaml.el
index 8f48bbe..9390fab 100644
--- a/lisp/ob-ocaml.el
+++ b/lisp/ob-ocaml.el
@@ -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."