mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 14:02:51 +00:00
better error message for unassigned variables
* lisp/ob.el (org-babel-merge-params): Better error message for unassigned variables.
This commit is contained in:
parent
be69dd2d50
commit
a4e881207d
|
@ -1843,12 +1843,16 @@ parameters when merging lists."
|
||||||
vars))
|
vars))
|
||||||
vars)
|
vars)
|
||||||
(list (cons name pair))))
|
(list (cons name pair))))
|
||||||
;; if no name is given, then assign to variables in order
|
;; if no name is given and we already have named variables
|
||||||
|
;; then assign to named variables in order
|
||||||
|
(if (and vars (nth variable-index vars))
|
||||||
(prog1 (setf (cddr (nth variable-index vars))
|
(prog1 (setf (cddr (nth variable-index vars))
|
||||||
(concat (symbol-name
|
(concat (symbol-name
|
||||||
(car (nth variable-index vars)))
|
(car (nth variable-index vars)))
|
||||||
"=" (cdr pair)))
|
"=" (cdr pair)))
|
||||||
(incf variable-index)))))
|
(incf variable-index))
|
||||||
|
(error "variable \"%s\" must be assigned a default value"
|
||||||
|
(cdr pair))))))
|
||||||
(:results
|
(:results
|
||||||
(setq results (e-merge results-exclusive-groups
|
(setq results (e-merge results-exclusive-groups
|
||||||
results
|
results
|
||||||
|
|
Loading…
Reference in a new issue