From fdc6e103932c68b450c72d44d062b4746ec2202c Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Mon, 27 Jun 2022 20:41:02 -0700 Subject: [PATCH 1/2] ob-core.el: Fix behavior of lambda default header arg vars * lisp/ob-core.el: Permit multiple :var default header arguments when using closures. --- lisp/ob-core.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 7a9467b0e..80086f12c 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2718,6 +2718,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))) -- 2.31.1