* lisp/ob-lisp.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:lisp):
This commit is contained in:
parent
6887851401
commit
320b0e5b1f
|
@ -74,13 +74,19 @@ current directory string."
|
|||
(let* ((vars (org-babel--get-vars params))
|
||||
(result-params (cdr (assq :result-params params)))
|
||||
(print-level nil) (print-length nil)
|
||||
(prologue (cdr (assq :prologue params)))
|
||||
(epilogue (cdr (assq :epilogue params)))
|
||||
(body (if (null vars) (org-trim body)
|
||||
(concat "(let ("
|
||||
(mapconcat
|
||||
(lambda (var)
|
||||
(format "(%S (quote %S))" (car var) (cdr var)))
|
||||
vars "\n ")
|
||||
")\n" body ")"))))
|
||||
")\n"
|
||||
(and prologue (concat prologue "\n"))
|
||||
body
|
||||
(and epilogue (concat "\n" epilogue "\n"))
|
||||
")"))))
|
||||
(if (or (member "code" result-params)
|
||||
(member "pp" result-params))
|
||||
(format "(pprint %s)" body)
|
||||
|
|
Loading…
Reference in New Issue