mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-21 19:34:58 +00:00
* lisp/ob-C.el: Add support for :prologue/:epilogue parameters
(org-babel-C-expand-C):
This commit is contained in:
parent
b3c8a7c360
commit
312deaa13a
@ -213,7 +213,9 @@ This function should only be called by `org-babel-execute:C' or
|
||||
nil))
|
||||
(namespaces (org-babel-read
|
||||
(cdr (assq :namespaces params))
|
||||
nil)))
|
||||
nil))
|
||||
(prologue (cdr (assq :prologue params)))
|
||||
(epilogue (cdr (assq :epilogue params))))
|
||||
(when (stringp includes)
|
||||
(setq includes (split-string includes)))
|
||||
(when (stringp namespaces)
|
||||
@ -227,6 +229,11 @@ This function should only be called by `org-babel-execute:C' or
|
||||
(nconc result (list (concat y " " x)))
|
||||
(setq y nil)))
|
||||
(setq defines (cdr result))))
|
||||
(setq body
|
||||
(concat
|
||||
(and prologue (concat prologue "\n"))
|
||||
body
|
||||
(and epilogue (concat "\n" epilogue "\n"))))
|
||||
(mapconcat 'identity
|
||||
(list
|
||||
;; includes
|
||||
|
Loading…
Reference in New Issue
Block a user