Christophe Weblog Wiki Code Publications Music
fix for visible values from region and interactive eval
[swankr.git] / swank.R
diff --git a/swank.R b/swank.R
index 0b48ed34e1dd29f2e0f5a96bb98594fdeb227db6..ce757b3995574feaacd94ed83dbdd5fbe03ea27b 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -519,7 +519,7 @@ withRetryRestart <- function(description, expr) {
                                                               envir=globalenv()))) })
   output <- paste(output, sep="", collapse="\n")
   if(tmp$visible) {
-    list(output, prin1ToString(value))
+    list(output, prin1ToString(tmp$value))
   } else {
     list(output, "# invisible value")
   }
@@ -529,7 +529,7 @@ withRetryRestart <- function(description, expr) {
   withRetryRestart("retry SLIME interactive evaluation request",
                    tmp <- withVisible(eval(parse(text=string), envir=globalenv())))
   if(tmp$visible) {
-    prin1ToString(value)
+    prin1ToString(tmp$value)
   } else {
     "# invisible value"
   }