mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-12 04:39:59 +00:00
* lisp/ob-calc.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:calc):
This commit is contained in:
parent
1f0eaefa52
commit
be59f11435
|
@ -44,8 +44,14 @@
|
||||||
(defvar org-babel-default-header-args:calc nil
|
(defvar org-babel-default-header-args:calc nil
|
||||||
"Default arguments for evaluating a calc source block.")
|
"Default arguments for evaluating a calc source block.")
|
||||||
|
|
||||||
(defun org-babel-expand-body:calc (body _params)
|
(defun org-babel-expand-body:calc (body params)
|
||||||
"Expand BODY according to PARAMS, return the expanded body." body)
|
"Expand BODY according to PARAMS, return the expanded body."
|
||||||
|
(let ((prologue (cdr (assq :prologue params)))
|
||||||
|
(epilogue (cdr (assq :epilogue params))))
|
||||||
|
(concat
|
||||||
|
(and prologue (concat prologue "\n"))
|
||||||
|
body
|
||||||
|
(and epilogue (concat "\n" epilogue "\n")))))
|
||||||
|
|
||||||
(defvar org--var-syms) ; Dynamically scoped from org-babel-execute:calc
|
(defvar org--var-syms) ; Dynamically scoped from org-babel-execute:calc
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue