Browse Source

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.
Eric Schulte 4 years ago
parent
commit
99a8d97ffa
1 changed files with 7 additions and 6 deletions
  1. 7 6
      lisp/ob-core.el

+ 7 - 6
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