This commit is contained in:
Eric Schulte 2009-06-15 09:22:36 -07:00
parent e7591f5a14
commit f7c002bcb7
1 changed files with 22 additions and 0 deletions

View File

@ -395,6 +395,28 @@ non-nil."
(dotimes (n size)
(move-beginning-of-line 1) (insert ": ") (forward-line 1))))))
(defun org-babel-merge-params (&rest plists)
"Combine all parameter association lists in PLISTS. Later
elements of PLISTS override the values of previous element. This
takes into account the specific parameter when merging lists."
(let (parameters)
(mapc (lambda (plist)
(mapc (lambda (pair)
(case (car pair)
(:var
;; we want only one specification per variable
(let ((vars (cons (cdr pair) (cdr (assoc :var params))))
(refs (mapcar (lambda (var)
(if (string-match "\\(.+\\)=\\(.+\\)" var)
(match-string))))))
)
)
(t (setq parameters (cons pair (assq-delete-all
(car pair) parameters))))))
plist))
plists)))
(defun org-babel-clean-text-properties (text)
"Strip all properties from text return."
(set-text-properties 0 (length text) nil text) text)