summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2011-10-21 11:35:41 -0600
committerEric Schulte <schulte.eric@gmail.com>2011-10-21 11:36:06 -0600
commit93bdeb92127fbfd8bc897c26e3dcb6d785da5ccb (patch)
treedd85eb71596536bcba7ebb5a4841afbd12f1ca23
parent0bcb248ee68497fc1eca722eb299ba254bcc726e (diff)
downloadorg-mode-93bdeb92127fbfd8bc897c26e3dcb6d785da5ccb.tar.gz
two more quick fixes
* lisp/ob.el (org-babel-balanced-split): Balance both [] and () groupings. (org-babel-parse-header-arguments): Be sure to replace removed ":" characters.
-rw-r--r--lisp/ob.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index 274d50a..a5103b2 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1121,10 +1121,10 @@ instances of \"[ \t]:\" set ALTS to '((32 9) . 58)."
(and (matches ch (cdr alts))
(matches last (car alts)))))
(let ((balance 0) (partial nil) (lst nil) (last 0))
- (mapc (lambda (ch) ; split on [] balanced instances of [ \t]:
+ (mapc (lambda (ch) ; split on [] or () balanced instances of [ \t]:
(setq balance (+ balance
- (cond ((equal 91 ch) 1)
- ((equal 93 ch) -1)
+ (cond ((or (equal 91 ch) (equal 40 ch)) 1)
+ ((or (equal 93 ch) (equal 41 ch)) -1)
(t 0))))
(setq partial (cons ch partial))
(when (and (= balance 0) (matched ch last))
@@ -1148,7 +1148,9 @@ instances of \"[ \t]:\" set ALTS to '((32 9) . 58)."
(cons (intern (match-string 1 arg))
(org-babel-read (org-babel-chomp (match-string 2 arg))))
(cons (intern (org-babel-chomp arg)) nil)))
- (org-babel-balanced-split arg-string '((32 9) . 58)))))))
+ ((lambda (raw)
+ (cons (car raw) (mapcar (lambda (r) (concat ":" r)) (cdr raw))))
+ (org-babel-balanced-split arg-string '((32 9) . 58))))))))
(defun org-babel-parse-multiple-vars (header-arguments)
"Expand multiple variable assignments behind a single :var keyword.