babel: emacs-lisp no longer evaluates header argument references multiple times

* lisp/babel/langs/ob-emacs-lisp.el
  (org-babel-expand-body:emacs-lisp): removed extra call to
  `org-babel-process-params' which was causing referenced code blocks
  to be run multiple times

  (org-babel-execute:emacs-lisp): now passing processed-params through
  to `org-babel-expand-body:emacs-lisp' which keeps references from
  being evaluated multiple times
This commit is contained in:
Eric Schulte 2010-06-24 14:05:34 -07:00
parent 08f8875ecd
commit a969714755
1 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,6 @@
"Expand BODY according to PARAMS, return the expanded body."
(let* ((processed-params (or processed-params (org-babel-process-params params)))
(vars (nth 1 processed-params))
(processed-params (org-babel-process-params params))
(result-params (nth 2 processed-params))
(print-level nil) (print-length nil)
(body (if (> (length vars) 0)
@ -66,7 +65,8 @@
(let ((processed-params (org-babel-process-params params)))
(org-babel-reassemble-table
(eval (read (format "(progn %s)"
(org-babel-expand-body:emacs-lisp body params))))
(org-babel-expand-body:emacs-lisp
body params processed-params))))
(org-babel-pick-name (nth 4 processed-params) (cdr (assoc :colnames params)))
(org-babel-pick-name (nth 5 processed-params) (cdr (assoc :rownames params)))))))