diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-04-29 08:26:01 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-04-29 08:26:01 -0600 |
commit | c7ed6cde3aa115b7c262d0d9d3938392c4c63499 (patch) | |
tree | 6153fde9f80c19ea5ae5bafe9c985e109c841eae | |
parent | bfdc9420503ded8d3dc05bff16f1af9f22f832aa (diff) | |
download | org-mode-c7ed6cde3aa115b7c262d0d9d3938392c4c63499.tar.gz |
ob-clojure: qualify pp dispatch functions, wrap body in (do )
Patch by Eric S Fraga
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Qualify pp
dispatch functions, wrap body in `(do )'.
-rw-r--r-- | lisp/ob-clojure.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 3c11b72..cc6c2de 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -63,11 +63,13 @@ body)))) (if (or (member "code" result-params) (member "pp" result-params)) - (format (concat "(let [org-mode-print-catcher (java.io.StringWriter.)]" - "(clojure.pprint/with-pprint-dispatch %s-dispatch" - "(clojure.pprint/pprint %s org-mode-print-catcher)" - "(str org-mode-print-catcher)))") - (if (member "code" result-params) "code" "simple") body) + (format + (concat + "(let [org-mode-print-catcher (java.io.StringWriter.)] " + "(clojure.pprint/with-pprint-dispatch clojure.pprint/%s-dispatch " + "(clojure.pprint/pprint (do %s) org-mode-print-catcher) " + "(str org-mode-print-catcher)))") + (if (member "code" result-params) "code" "simple") body) body))) (defun org-babel-execute:clojure (body params) |