Christophe Weblog Wiki Code Publications Music
support swank:clear-repl-results in swank-presentations
authorChristophe Rhodes <csr21@cantab.net>
Tue, 31 Aug 2010 08:02:14 +0000 (09:02 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Tue, 31 Aug 2010 08:02:14 +0000 (09:02 +0100)
This makes my worry about lacking weak hash tables a bit less
pressing.

swank-presentations.R

index d2ed3f71efe45542bb3454a3fec4a815cd4d987e..0832fafd931b59bcb6177f4b13781d8a9bec4417 100644 (file)
@@ -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
+}