* lisp/ob-lilypond.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:lilypond):
This commit is contained in:
parent
f0a2531bb4
commit
6887851401
|
@ -131,7 +131,9 @@ blocks.")
|
||||||
|
|
||||||
(defun org-babel-expand-body:lilypond (body params)
|
(defun org-babel-expand-body:lilypond (body params)
|
||||||
"Expand BODY according to PARAMS, return the expanded body."
|
"Expand BODY according to PARAMS, return the expanded body."
|
||||||
(let ((vars (org-babel--get-vars params)))
|
(let ((vars (org-babel--get-vars params))
|
||||||
|
(prologue (cdr (assq :prologue params)))
|
||||||
|
(epilogue (cdr (assq :epilogue params))))
|
||||||
(mapc
|
(mapc
|
||||||
(lambda (pair)
|
(lambda (pair)
|
||||||
(let ((name (symbol-name (car pair)))
|
(let ((name (symbol-name (car pair)))
|
||||||
|
@ -142,7 +144,10 @@ blocks.")
|
||||||
(if (stringp value) value (format "%S" value))
|
(if (stringp value) value (format "%S" value))
|
||||||
body))))
|
body))))
|
||||||
vars)
|
vars)
|
||||||
body))
|
(concat
|
||||||
|
(and prologue (concat prologue "\n"))
|
||||||
|
body
|
||||||
|
(and epilogue (concat "\n" epilogue "\n")))))
|
||||||
|
|
||||||
(defun org-babel-execute:lilypond (body params)
|
(defun org-babel-execute:lilypond (body params)
|
||||||
"Execute LilyPond src block according to arrange mode.
|
"Execute LilyPond src block according to arrange mode.
|
||||||
|
|
Loading…
Reference in New Issue