From 1b24056279f85b8b6988f8d35eceaf98ba3dc615 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Tue, 31 Aug 2010 09:02:14 +0100 Subject: [PATCH] support swank:clear-repl-results in swank-presentations This makes my worry about lacking weak hash tables a bit less pressing. --- swank-presentations.R | 7 +++++++ 1 file changed, 7 insertions(+) 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 +} -- 2.30.2