From: Christophe Rhodes Date: Tue, 31 Aug 2010 08:02:14 +0000 (+0100) Subject: support swank:clear-repl-results in swank-presentations X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=1b24056279f85b8b6988f8d35eceaf98ba3dc615;p=swankr.git support swank:clear-repl-results in swank-presentations This makes my worry about lacking weak hash tables a bit less pressing. --- diff --git a/swank-presentations.R b/swank-presentations.R index d2ed3f7..0832faf 100644 --- a/swank-presentations.R +++ b/swank-presentations.R @@ -45,3 +45,10 @@ sendReplResultFunction <- presentReplResult } } +`swank:clear-repl-results` <- function(slimeConnection, sldbState) { + if(!exists("idToObject", envir=slimeConnection)) { + assign("idToObject", new.env(), envir=slimeConnection) + } + rm(list=ls(slimeConnection$idToObject), envir=slimeConnection$idToObject) + TRUE +}