Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
This commit is contained in:
commit
3b377f52dd
|
@ -127,8 +127,9 @@ specifying a var of the same value."
|
|||
(let ((vars-forms (mapconcat ;; define any variables
|
||||
(lambda (pair)
|
||||
(format "%s %s" (car pair) (org-babel-clojure-var-to-clojure (cdr pair))))
|
||||
vars "\n ")))
|
||||
(format "(let [%s]\n %s)" vars-forms (org-babel-trim body))))
|
||||
vars "\n "))
|
||||
(body (org-babel-trim body)))
|
||||
(if (> (length vars-forms) 0) (format "(let [%s]\n %s)" vars-forms body) body)))
|
||||
|
||||
(defun org-babel-prep-session:clojure (session params)
|
||||
"Prepare SESSION according to the header arguments specified in PARAMS."
|
||||
|
|
|
@ -45,15 +45,16 @@
|
|||
(processed-params (org-babel-process-params params))
|
||||
(result-params (third processed-params))
|
||||
(print-level nil) (print-length nil)
|
||||
(body (concat "(let ("
|
||||
(body (if (> (length vars) 0)
|
||||
(concat "(let ("
|
||||
(mapconcat
|
||||
(lambda (var) (format "%S" (print `(,(car var) ',(cdr var)))))
|
||||
vars "\n ")
|
||||
")\n"
|
||||
")\n" body ")")
|
||||
body)))
|
||||
(if (or (member "code" result-params)
|
||||
(member "pp" result-params))
|
||||
(concat "(pp " body ")") body) ")")))
|
||||
body))
|
||||
(concat "(pp " body ")") body)))
|
||||
|
||||
(defun org-babel-execute:emacs-lisp (body params)
|
||||
"Execute a block of emacs-lisp code with org-babel."
|
||||
|
|
|
@ -187,13 +187,16 @@ code blocks by language."
|
|||
(cons
|
||||
(cons src-lang
|
||||
(cons (list link source-name params
|
||||
((lambda (body)
|
||||
(if (assoc :no-expand params)
|
||||
body
|
||||
(funcall
|
||||
(intern
|
||||
(concat "org-babel-expand-body:" src-lang))
|
||||
(intern (concat "org-babel-expand-body:" src-lang))
|
||||
body
|
||||
params)))
|
||||
(if (and (cdr (assoc :noweb params))
|
||||
(string= "yes" (cdr (assoc :noweb params))))
|
||||
(org-babel-expand-noweb-references info) (second info))
|
||||
params)
|
||||
(org-babel-expand-noweb-references info) (second info)))
|
||||
(third (cdr (assoc
|
||||
src-lang org-babel-tangle-langs))))
|
||||
by-lang)) blocks))))))
|
||||
|
|
Loading…
Reference in New Issue