X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=blobdiff_plain;f=swank.R;h=b5c79c78204695667f421bbceb3b3e83664971c1;hp=cf64daaaa81b8ad7341284a67dd67423058c922f;hb=dc22b346c159268666cdf0ccdafd740222ef861a;hpb=76176a55e2dddcca8c770479efe15fa19d0959f0 diff --git a/swank.R b/swank.R index cf64daa..b5c79c7 100644 --- a/swank.R +++ b/swank.R @@ -324,12 +324,14 @@ sendReplResultFunction <- sendReplResult `swank:listener-eval` <- function(slimeConnection, sldbState, string) { ## O how ugly string <- gsub("#\\.\\(swank:lookup-presented-object-or-lose([^)]*)\\)", ".(`swank:lookup-presented-object-or-lose`(slimeConnection, sldbState,\\1))", string) - expr <- parse(text=string)[[1]] - ## O maybe this is even uglier - lookedup <- do.call("bquote", list(expr)) - tmp <- withVisible(eval(lookedup, envir = globalenv())) - if(tmp$visible) { - sendReplResultFunction(slimeConnection, tmp$value) + for(expr in parse(text=string)) { + expr <- expr + ## O maybe this is even uglier + lookedup <- do.call("bquote", list(expr)) + tmp <- withVisible(eval(lookedup, envir = globalenv())) + if(tmp$visible) { + sendReplResultFunction(slimeConnection, tmp$value) + } } list() }