diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 98a66d1ec..fdb0a7593 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -155,21 +155,21 @@ or set the `:backend' header argument")))) (result-params (cdr (assq :result-params params))) (print-level nil) (print-length nil) - ;; Remove comments, they break (let [...] ...) bindings - (body (replace-regexp-in-string "^[ ]*;+.*$" "" body)) (body (org-trim (concat ;; Source block specified namespace :ns. (and (cdr (assq :ns params)) (format "(ns %s)\n" ns)) ;; Variables binding. (if (null vars) (org-trim body) - (format "(let [%s]\n%s)" + ;; Remove comments, they break (let [...] ...) bindings + (let ((body (replace-regexp-in-string "^[ ]*;+.*$" "" body))) + (format "(let [%s]\n%s)" (mapconcat (lambda (var) (format "%S '%S" (car var) (cdr var))) vars "\n ") - body)))))) + body))))))) ;; If the result param is set to "output" we don't have to do ;; anything special and just let the backend handle everything (if (member "output" result-params)