1
0
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:
Ihor Radchenko 2023-10-19 11:56:49 +03:00
parent b3c8a7c360
commit 312deaa13a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -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