summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2013-07-29 13:58:03 (GMT)
committer Eric Schulte <schulte.eric@gmail.com>2013-07-29 13:58:22 (GMT)
commit99a8d97ffa000b391969806d655ac0f7aef193b2 (patch)
treea164bb3da47e8c8f1056e225ab0760dbbb0675ae
parentd73ff5fd61614ae6e3937aa588e790b3f9a2cd95 (diff)
downloadorg-mode-99a8d97ffa000b391969806d655ac0f7aef193b2.zip
org-mode-99a8d97ffa000b391969806d655ac0f7aef193b2.tar.gz
don't modify missing header arguments during merge
* lisp/ob-core.el (org-babel-merge-params): More careful to check that the colname- and rowname-names header arguments exist during merge.
-rw-r--r--lisp/ob-core.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index c2722db..cc25357 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2357,12 +2357,13 @@ parameters when merging lists."
(lambda (name)
(mapc
(lambda (param)
- (setf (cdr (assoc param params))
- (remove-if (lambda (pair) (equal (car pair) name))
- (cdr (assoc param params))))
- (setf params (remove-if (lambda (pair) (and (equal (car pair) param)
- (null (cdr pair))))
- params)))
+ (when (assoc param params)
+ (setf (cdr (assoc param params))
+ (remove-if (lambda (pair) (equal (car pair) name))
+ (cdr (assoc param params))))
+ (setf params (remove-if (lambda (pair) (and (equal (car pair) param)
+ (null (cdr pair))))
+ params))))
(list :colname-names :rowname-names)))
clearnames)
(mapc