diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2013-06-23 10:39:00 +0200 |
---|---|---|
committer | Achim Gratz <Stromeko@Stromeko.DE> | 2013-06-23 19:35:11 +0200 |
commit | 90b168705eea60767403344f9da2ca26d429dd30 (patch) | |
tree | 3c15931279868c130c622ad253eef5d89c41f355 | |
parent | 68276fd62d7c6663641d9f2f028e80823dab2eff (diff) | |
download | org-mode-90b168705eea60767403344f9da2ca26d429dd30.tar.gz |
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.
-rw-r--r-- | lisp/ob-core.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el index b8cd3f7..79df71f 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 () |