From 90b168705eea60767403344f9da2ca26d429dd30 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 23 Jun 2013 10:39:00 +0200 Subject: [PATCH] ob-core: evaluate header-args[:lang] properties at point of call * lisp/ob-core.el (org-babel-params-from-properties): Use `org-babel-current-src-block-location' for evaluating new-style header-argument properties. Remove superfluous save-match-data clauses. Comment which properties get evaluated where. --- lisp/ob-core.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index b8cd3f7cf..79df71fe2 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1304,7 +1304,8 @@ Return a list of association lists of source block params specified in the properties of the current outline entry." (save-match-data (list - ;; header arguments specified as separate property + ;; DEPRECATED header arguments specified as separate property at + ;; point of definition (let (val sym) (org-babel-parse-multiple-vars (delq nil @@ -1322,16 +1323,15 @@ specified in the properties of the current outline entry." (progn (setq sym (intern (concat "org-babel-header-args:" lang))) (and (boundp sym) (eval sym)))))))))) - ;; header arguments specified with the header-args property - (save-match-data - (org-babel-parse-header-arguments - (org-entry-get (point) "header-args" - 'inherit))) - ;; language-specific header arguments - (save-match-data - (org-babel-parse-header-arguments - (org-entry-get (point) (concat "header-args:" lang) - 'inherit)))))) + ;; header arguments specified with the header-args property at + ;; point of call + (org-babel-parse-header-arguments + (org-entry-get org-babel-current-src-block-location + "header-args" 'inherit)) + (when lang ;; language-specific header arguments at point of call + (org-babel-parse-header-arguments + (org-entry-get org-babel-current-src-block-location + (concat "header-args:" lang) 'inherit)))))) (defvar org-src-preserve-indentation) (defun org-babel-parse-src-block-match () -- 2.11.4.GIT