From: Christophe Rhodes Date: Sat, 20 Sep 2014 12:51:35 +0000 (+0100) Subject: new function `swank:init-presentations` X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=bf3b2b6574042d5001c63bc3a54c82bcd0d29e86;p=swankr.git new function `swank:init-presentations` Set up the REPL reporting function in it, not at toplevel --- diff --git a/swank-presentations.R b/swank-presentations.R index 69488cf..22ce24c 100644 --- a/swank-presentations.R +++ b/swank-presentations.R @@ -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 +}