X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=blobdiff_plain;f=swank.R;h=c50114a1a65769edbf5ffe856e2f8f13d5d29bb9;hp=0b48ed34e1dd29f2e0f5a96bb98594fdeb227db6;hb=2fcb575405fcfbe8736d0188fce113af39c43f40;hpb=d11a1ea1567dd40eec6d281b6d2836dd4d79b271 diff --git a/swank.R b/swank.R index 0b48ed3..c50114a 100644 --- a/swank.R +++ b/swank.R @@ -423,6 +423,9 @@ computeRestartsForEmacs <- function (sldbState) { `swank:frame-locals-and-catch-tags` <- function(slimeConnection, sldbState, index) { frame <- sldbState$frames[[1+index]] objs <- ls(envir=frame) + if(identical(frame, globalenv())) { + objs <- c() + } list(lapply(objs, function(name) { list(quote(`:name`), name, quote(`:id`), 0, quote(`:value`), @@ -519,7 +522,7 @@ withRetryRestart <- function(description, expr) { envir=globalenv()))) }) output <- paste(output, sep="", collapse="\n") if(tmp$visible) { - list(output, prin1ToString(value)) + list(output, prin1ToString(tmp$value)) } else { list(output, "# invisible value") } @@ -529,7 +532,7 @@ withRetryRestart <- function(description, expr) { withRetryRestart("retry SLIME interactive evaluation request", tmp <- withVisible(eval(parse(text=string), envir=globalenv()))) if(tmp$visible) { - prin1ToString(value) + prin1ToString(tmp$value) } else { "# invisible value" }