X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=blobdiff_plain;f=swank-presentations.R;h=6ac0e75af1dd190a0998ec8d3d689c03bc3e1b6d;hp=d2ed3f71efe45542bb3454a3fec4a815cd4d987e;hb=fdb4f4d744580b9dc6db92489610f32e42cec15e;hpb=e35149b43e4da28f542c6bdf2decd802e84dd440 diff --git a/swank-presentations.R b/swank-presentations.R index d2ed3f7..6ac0e75 100644 --- a/swank-presentations.R +++ b/swank-presentations.R @@ -27,7 +27,6 @@ sendReplResultFunction <- presentReplResult } `swank:lookup-presented-object` <- function(slimeConnection, sldbState, id) { - str(ls(slimeConnection)) if(exists(as.character(id), envir=slimeConnection$idToObject)) { value <- get(as.character(id), envir=slimeConnection$idToObject) list(value, TRUE) @@ -45,3 +44,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 +}