From 52fbfeb04b10aa78f24f339a352fe1161c0b37e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Delafond?= Date: Sun, 13 Jul 2014 13:35:31 +0200 Subject: Imported Upstream version 8.2.4 --- lisp/ob-R.el | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'lisp/ob-R.el') diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 74d7513..58f5536 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -85,21 +85,22 @@ (or graphics-file (org-babel-R-graphical-output-file params)))) (mapconcat #'identity - ((lambda (inside) - (if graphics-file - (append - (list (org-babel-R-construct-graphics-device-call - graphics-file params)) - inside - (list "dev.off()")) - inside)) - (append - (when (cdr (assoc :prologue params)) - (list (cdr (assoc :prologue params)))) - (org-babel-variable-assignments:R params) - (list body) - (when (cdr (assoc :epilogue params)) - (list (cdr (assoc :epilogue params)))))) "\n"))) + (let ((inside + (append + (when (cdr (assoc :prologue params)) + (list (cdr (assoc :prologue params)))) + (org-babel-variable-assignments:R params) + (list body) + (when (cdr (assoc :epilogue params)) + (list (cdr (assoc :epilogue params))))))) + (if graphics-file + (append + (list (org-babel-R-construct-graphics-device-call + graphics-file params)) + inside + (list "dev.off()")) + inside)) + "\n"))) (defun org-babel-execute:R (body params) "Execute a block of R code. @@ -324,6 +325,8 @@ last statement in BODY, as elisp." column-names-p))) (output (org-babel-eval org-babel-R-command body)))) +(defvar ess-eval-visibly-p) + (defun org-babel-R-evaluate-session (session body result-type result-params column-names-p row-names-p) "Evaluate BODY in SESSION. -- cgit v1.2.3