diff --git a/lisp/ob-emacs-lisp.el b/lisp/ob-emacs-lisp.el index 4150f1f35..a18038112 100644 --- a/lisp/ob-emacs-lisp.el +++ b/lisp/ob-emacs-lisp.el @@ -61,31 +61,30 @@ by `org-edit-src-code'.") (defun org-babel-execute:emacs-lisp (body params) "Execute a block of emacs-lisp code with Babel." - (save-window-excursion - (let* ((lexical (cdr (assq :lexical params))) - (result-params (cdr (assq :result-params params))) - (body (format (if (member "output" result-params) - "(with-output-to-string %s\n)" - "(progn %s\n)") - (org-babel-expand-body:emacs-lisp body params))) - (result (eval (read (if (or (member "code" result-params) - (member "pp" result-params)) - (concat "(pp " body ")") - body)) - (org-babel-emacs-lisp-lexical lexical)))) - (org-babel-result-cond result-params - (let ((print-level nil) - (print-length nil)) - (if (or (member "scalar" result-params) - (member "verbatim" result-params)) - (format "%S" result) - (format "%s" result))) - (org-babel-reassemble-table - result - (org-babel-pick-name (cdr (assq :colname-names params)) - (cdr (assq :colnames params))) - (org-babel-pick-name (cdr (assq :rowname-names params)) - (cdr (assq :rownames params)))))))) + (let* ((lexical (cdr (assq :lexical params))) + (result-params (cdr (assq :result-params params))) + (body (format (if (member "output" result-params) + "(with-output-to-string %s\n)" + "(progn %s\n)") + (org-babel-expand-body:emacs-lisp body params))) + (result (eval (read (if (or (member "code" result-params) + (member "pp" result-params)) + (concat "(pp " body ")") + body)) + (org-babel-emacs-lisp-lexical lexical)))) + (org-babel-result-cond result-params + (let ((print-level nil) + (print-length nil)) + (if (or (member "scalar" result-params) + (member "verbatim" result-params)) + (format "%S" result) + (format "%s" result))) + (org-babel-reassemble-table + result + (org-babel-pick-name (cdr (assq :colname-names params)) + (cdr (assq :colnames params))) + (org-babel-pick-name (cdr (assq :rowname-names params)) + (cdr (assq :rownames params))))))) (defun org-babel-emacs-lisp-lexical (lexical) "Interpret :lexical source block argument.