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.
This commit is contained in:
Achim Gratz 2013-06-23 10:39:00 +02:00
parent 68276fd62d
commit 90b168705e
1 changed files with 11 additions and 11 deletions

View File

@ -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 ()