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 )'.
This commit is contained in:
Eric Schulte 2011-04-29 08:26:01 -06:00
parent bfdc942050
commit c7ed6cde3a
1 changed files with 7 additions and 5 deletions

View File

@ -63,9 +63,11 @@
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)"
(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)))