ob-clojure.el: Fix let binding expansion and comments removal

* lisp/ob-clojure.el (org-babel-expand-body:clojure): Remove
comment while expanding the body of the source block.
(org-babel-expand-body:clojure): Don't quote the value of src
block variables.
This commit is contained in:
Bastien 2020-02-12 11:24:07 +01:00
parent 22a42fe30e
commit b1f564b4b6
1 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,8 @@ If the value is nil, timeout is disabled."
(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.
@ -113,7 +115,7 @@ If the value is nil, timeout is disabled."
(format "(let [%s]\n%s)"
(mapconcat
(lambda (var)
(format "%S (quote %S)" (car var) (cdr var)))
(format "%S %S" (car var) (cdr var)))
vars
"\n ")
body))))))