ob-clojure.el: cosmetic reformatting of a defun.
This commit is contained in:
parent
920cf53e68
commit
4c714198b4
|
@ -62,16 +62,16 @@
|
||||||
vars "\n ")
|
vars "\n ")
|
||||||
"]\n" body ")")
|
"]\n" body ")")
|
||||||
body))))
|
body))))
|
||||||
(if (or (member "code" result-params)
|
(cond ((or (member "code" result-params) (member "pp" result-params))
|
||||||
(member "pp" result-params))
|
(format (concat "(let [org-mode-print-catcher (java.io.StringWriter.)] "
|
||||||
(format
|
"(clojure.pprint/with-pprint-dispatch clojure.pprint/%s-dispatch "
|
||||||
(concat
|
"(clojure.pprint/pprint (do %s) org-mode-print-catcher) "
|
||||||
"(let [org-mode-print-catcher (java.io.StringWriter.)] "
|
"(str org-mode-print-catcher)))")
|
||||||
"(clojure.pprint/with-pprint-dispatch clojure.pprint/%s-dispatch "
|
(if (member "code" result-params) "code" "simple") body))
|
||||||
"(clojure.pprint/pprint (do %s) org-mode-print-catcher) "
|
;; if (:results output), collect printed output
|
||||||
"(str org-mode-print-catcher)))")
|
((member "output" result-params)
|
||||||
(if (member "code" result-params) "code" "simple") body)
|
(format "(clojure.core/with-out-str %s)" body))
|
||||||
body)))
|
(t body))))
|
||||||
|
|
||||||
(defun org-babel-execute:clojure (body params)
|
(defun org-babel-execute:clojure (body params)
|
||||||
"Execute a block of Clojure code with Babel."
|
"Execute a block of Clojure code with Babel."
|
||||||
|
|
Loading…
Reference in New Issue