Przeglądaj źródła

ob: preserve the order of variable parameters

* lisp/ob.el (org-babel-merge-params): Ensure variable parameters are
  not reversed.

* lisp/ob-ref.el (org-babel-ref-split-args): Ensure variable
  parameters are not reversed.
Eric Schulte 14 lat temu
rodzic
commit
27c3cad589
2 zmienionych plików z 2 dodań i 1 usunięć
  1. 1 1
      lisp/ob-ref.el
  2. 1 0
      lisp/ob.el

+ 1 - 1
lisp/ob-ref.el

@@ -207,7 +207,7 @@ to \"0:-1\"."
       (cond
        ((string= holder ",")
         (when (= depth 0)
-          (setq return (reverse (cons (substring buffer 0 -1) return)))
+          (setq return (cons (substring buffer 0 -1) return))
           (setq buffer "")))
        ((or (string= holder "(") (string= holder "[")) (setq depth (+ depth 1)))
        ((or (string= holder ")") (string= holder "]")) (setq depth (- depth 1)))))

+ 1 - 0
lisp/ob.el

@@ -1805,6 +1805,7 @@ parameters when merging lists."
 	       (setq params (cons pair (assq-delete-all (car pair) params))))))
 	  plist))
        plists))
+    (setq vars (reverse vars))
     (while vars (setq params (cons (cons :var (cddr (pop vars))) params)))
     (mapc
      (lambda (hd)