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:
parent
22a42fe30e
commit
b1f564b4b6
|
@ -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))))))
|
||||
|
|
Loading…
Reference in New Issue