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 69488cfa9dd7f954b60d1bbd0d9012e979db18c7..22ce24c2b9a4d56dce5ef4f1f558896aac876a0b 100644 (file)
@@ -22,8 +22,6 @@ presentReplResult <- function(slimeConnection, value) {
               list(quote(`:write-string`), "\n", quote(`:repl-result`)))
 }
 
               list(quote(`:write-string`), "\n", quote(`:repl-result`)))
 }
 
-sendReplResultFunction <- presentReplResult
-
 `cl:nth-value` <- function(slimeConnection, sldbState, n, values) {
   values[[n+1]]
 }
 `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
 }
   rm(list=ls(slimeConnection$idToObject), envir=slimeConnection$idToObject)
   TRUE
 }
+
+`swank:init-presentations` <- function(slimeConnection, sldbState) {
+  sendReplResultFunction <<- presentReplResult
+  TRUE
+}