Christophe Weblog Wiki Code Publications Music
new function `swank:init-presentations`
authorChristophe Rhodes <csr21@cantab.net>
Sat, 20 Sep 2014 12:51:35 +0000 (13:51 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sat, 20 Sep 2014 12:51:35 +0000 (13:51 +0100)
Set up the REPL reporting function in it, not at toplevel

swank-presentations.R

index 69488cf..22ce24c 100644 (file)
@@ -22,8 +22,6 @@ presentReplResult <- function(slimeConnection, value) {
               list(quote(`:write-string`), "\n", quote(`:repl-result`)))
 }
 
-sendReplResultFunction <- presentReplResult
-
 `cl:nth-value` <- function(slimeConnection, sldbState, n, values) {
   values[[n+1]]
 }
@@ -58,3 +56,8 @@ sendReplResultFunction <- presentReplResult
   rm(list=ls(slimeConnection$idToObject), envir=slimeConnection$idToObject)
   TRUE
 }
+
+`swank:init-presentations` <- function(slimeConnection, sldbState) {
+  sendReplResultFunction <<- presentReplResult
+  TRUE
+}