From bf3b2b6574042d5001c63bc3a54c82bcd0d29e86 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sat, 20 Sep 2014 13:51:35 +0100 Subject: [PATCH] new function `swank:init-presentations` Set up the REPL reporting function in it, not at toplevel --- swank-presentations.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 +} -- 2.30.2