diff --git a/contrib/babel/lisp/langs/org-babel-emacs-lisp.el b/contrib/babel/lisp/langs/org-babel-emacs-lisp.el index f15afe3e8..510ce9128 100644 --- a/contrib/babel/lisp/langs/org-babel-emacs-lisp.el +++ b/contrib/babel/lisp/langs/org-babel-emacs-lisp.el @@ -62,7 +62,8 @@ (save-window-excursion (let ((processed-params (org-babel-process-params params))) (org-babel-reassemble-table - (eval (read (org-babel-expand-body:emacs-lisp body params))) + (eval (read (format "(progn %s)" + (org-babel-expand-body:emacs-lisp body 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))))))) diff --git a/contrib/babel/lisp/org-babel-tangle.el b/contrib/babel/lisp/org-babel-tangle.el index 2f7f8a223..e2aa44a21 100644 --- a/contrib/babel/lisp/org-babel-tangle.el +++ b/contrib/babel/lisp/org-babel-tangle.el @@ -176,6 +176,7 @@ code blocks by language." (source-name (intern (or (fifth info) (format "block-%d" block-counter)))) (src-lang (first info)) + (expand-cmd (intern (concat "org-babel-expand-body:" src-lang))) (params (third info)) by-lang) (unless (string= (cdr (assoc :tangle params)) "no") ;; maybe skip @@ -191,7 +192,7 @@ code blocks by language." (if (assoc :no-expand params) body (funcall - (intern (concat "org-babel-expand-body:" src-lang)) + (if (fboundp expand-cmd) expand-cmd 'org-babel-expand-body:generic) body params))) (if (and (cdr (assoc :noweb params))