More code streamlining: org-babel-execute:emacs-lisp.

This commit is contained in:
Dan Davison 2009-07-16 16:23:49 -04:00
parent d128662fa3
commit 4fa9c162d9
1 changed files with 3 additions and 5 deletions

View File

@ -40,11 +40,9 @@
function is called by `org-babel-execute-src-block' via multiple-value-bind." function is called by `org-babel-execute-src-block' via multiple-value-bind."
(message "executing emacs-lisp code block...") (message "executing emacs-lisp code block...")
(save-window-excursion (save-window-excursion
(let ((print-level nil) (print-length nil) results) (let ((print-level nil) (print-length nil))
(setq results (eval `(let ,(mapcar (lambda (var) `(,(car var) ',(cdr var))) vars)
(eval `(let ,(mapcar (lambda (var) `(,(car var) ',(cdr var))) vars) ,(read (concat "(progn " body ")")))))))
,(read (concat "(progn " body ")")))))
results)))
(provide 'org-babel-lisp) (provide 'org-babel-lisp)
;;; org-babel-lisp.el ends here ;;; org-babel-lisp.el ends here