Browse Source

ob-tangle: Fix failing test on Emacs 24.3

* lisp/ob-tangle.el (org-babel-tangle): Do not use `add-to-list' on
  a let-bound symbol.
Nicolas Goaziou 8 years ago
parent
commit
69552bd42f
1 changed files with 2 additions and 4 deletions
  1. 2 4
      lisp/ob-tangle.el

+ 2 - 4
lisp/ob-tangle.el

@@ -290,10 +290,8 @@ used to limit the exported source code blocks by language."
 			(unless tangle-mode (setq tangle-mode #o755)))
 		      ;; update counter
 		      (setq block-counter (+ 1 block-counter))
-		      (add-to-list 'path-collector
-				   (cons file-name tangle-mode)
-				   nil
-				   (lambda (a b) (equal (car a) (car b))))))))
+		      (unless (assoc file-name path-collector)
+			(push (cons file-name tangle-mode) path-collector))))))
 	      specs)))
 	 (if (equal arg '(4))
 	     (org-babel-tangle-single-block 1 t)