summaryrefslogtreecommitdiff
path: root/lisp/org/ob-ocaml.el
diff options
context:
space:
mode:
authorBastien Guerry <bastien1@free.fr>2011-07-28 17:13:49 +0200
committerBastien Guerry <bastien1@free.fr>2011-07-28 17:13:49 +0200
commit3ab2c837b302b01fff610f7b83050ab7e703477c (patch)
treeefa67ed523bbda4d41488ae6b9ad2782941ddcf2 /lisp/org/ob-ocaml.el
parent44a8054f971837447e80d618b6e0c2a77778a2ee (diff)
downloademacs-3ab2c837b302b01fff610f7b83050ab7e703477c.tar.gz
Merge changes from Org 7.4 to current Org 7.7.
Diffstat (limited to 'lisp/org/ob-ocaml.el')
-rw-r--r--lisp/org/ob-ocaml.el31
1 files changed, 10 insertions, 21 deletions
diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el
index bf34b984c00..c4b40c46cb8 100644
--- a/lisp/org/ob-ocaml.el
+++ b/lisp/org/ob-ocaml.el
@@ -1,11 +1,11 @@
;;; ob-ocaml.el --- org-babel functions for ocaml evaluation
-;; Copyright (C) 2009-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org
-;; Version: 7.4
+;; Version: 7.7
;; This file is part of GNU Emacs.
@@ -44,6 +44,7 @@
(declare-function tuareg-run-caml "ext:tuareg" ())
(declare-function tuareg-interactive-send-input "ext:tuareg" ())
+(defvar org-babel-tangle-lang-exts)
(add-to-list 'org-babel-tangle-lang-exts '("ocaml" . "ml"))
(defvar org-babel-default-header-args:ocaml '())
@@ -125,32 +126,20 @@ OUTPUT is string output from an ocaml process."
"Convert RESULTS into an elisp table or string.
If the results look like a table, then convert them into an
Emacs-lisp table, otherwise return the results as a string."
- (org-babel-read
- (if (and (stringp results) (string-match "^\\[.+\\]$" results))
- (org-babel-read
- (replace-regexp-in-string
- "\\[" "(" (replace-regexp-in-string
- "\\]" ")" (replace-regexp-in-string
- "; " " " (replace-regexp-in-string
- "'" "\"" results)))))
- results)))
+ (org-babel-script-escape (replace-regexp-in-string ";" "," results)))
(defun org-babel-ocaml-read-array (results)
"Convert RESULTS into an elisp table or string.
If the results look like a table, then convert them into an
Emacs-lisp table, otherwise return the results as a string."
- (org-babel-read
- (if (and (stringp results) (string-match "^\\[.+\\]$" results))
- (org-babel-read
- (concat
- "'" (replace-regexp-in-string
- "\\[|" "(" (replace-regexp-in-string
- "|\\]" ")" (replace-regexp-in-string
- "; " " " (replace-regexp-in-string
- "'" "\"" results))))))
- results)))
+ (org-babel-script-escape
+ (replace-regexp-in-string
+ "\\[|" "[" (replace-regexp-in-string
+ "|\\]" "]" (replace-regexp-in-string
+ "; " "," results)))))
(provide 'ob-ocaml)
+;; arch-tag: 2e815f4d-365e-4d69-b1df-dd17fdd7b7b7
;;; ob-ocaml.el ends here