Check that functional-syntax variables are initialized.
* lisp/ob.el (org-babel-get-src-block-info): Check that functional-syntax variables are initialized.
This commit is contained in:
parent
f075ada9a1
commit
11f07576cb
11
lisp/ob.el
11
lisp/ob.el
|
@ -220,8 +220,15 @@ Returns a list
|
||||||
(when (match-string 6)
|
(when (match-string 6)
|
||||||
(setf (nth 2 info) ;; merge functional-syntax vars and header-args
|
(setf (nth 2 info) ;; merge functional-syntax vars and header-args
|
||||||
(org-babel-merge-params
|
(org-babel-merge-params
|
||||||
(mapcar (lambda (ref) (cons :var ref))
|
(mapcar
|
||||||
(org-babel-ref-split-args (match-string 6)))
|
(lambda (ref) (cons :var ref))
|
||||||
|
(mapcar
|
||||||
|
(lambda (var) ;; check that each variable is initialized
|
||||||
|
(unless (string-match ".+=.+" var)
|
||||||
|
(error
|
||||||
|
"variable \"%s\"%s must be assigned a default value"
|
||||||
|
var (if name (format " in block \"%s\"" name) ""))))
|
||||||
|
(org-babel-ref-split-args (match-string 6))))
|
||||||
(nth 2 info))))))
|
(nth 2 info))))))
|
||||||
;; inline source block
|
;; inline source block
|
||||||
(when (org-babel-get-inline-src-block-matches)
|
(when (org-babel-get-inline-src-block-matches)
|
||||||
|
|
Loading…
Reference in New Issue