emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org e8dd98d151 1/2: ob-core.el: Fix behavior of lambda


From: ELPA Syncer
Subject: [elpa] externals/org e8dd98d151 1/2: ob-core.el: Fix behavior of lambda default header arg vars
Date: Sat, 9 Jul 2022 01:57:44 -0400 (EDT)

branch: externals/org
commit e8dd98d151fb918723d840c9d7019ee7b025d9d4
Author: Matt Huszagh <huszaghmatt@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    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.
---
 lisp/ob-core.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 75a6a167d0..650db5bed2 100644
--- a/lisp/ob-core.el
+++ b/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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]