Browse Source

ob-core.el: Fix behavior of lambda default header arg vars

* lisp/ob-core.el (org-babel-merge-params): Permit multiple :var
default header arguments when using closures.
Matt Huszagh 2 years ago
parent
commit
e8dd98d151
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lisp/ob-core.el

+ 5 - 0
lisp/ob-core.el

@@ -2749,6 +2749,11 @@ parameters when merging lists."
 	(pcase pair
 	  (`(:var . ,value)
 	   (let ((name (cond
+                        ;; Default header arguments can accept lambda
+                        ;; functions.  We uniquely identify the var
+                        ;; according to the full string contents of
+                        ;; the lambda function.
+			((functionp value) value)
 			((listp value) (car value))
 			((string-match "^\\([^= \f\t\n\r\v]+\\)[ \t]*=" value)
 			 (intern (match-string 1 value)))