From: Christophe Rhodes Date: Sun, 12 Sep 2010 17:06:26 +0000 (+0100) Subject: implement swank:eval-string-in-frame X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=693bbdb7ab36ad8a1c0915bc76097c82f7170570;p=swankr.git implement swank:eval-string-in-frame Reified environments make quite a lot of this fairly easy... --- diff --git a/swank.R b/swank.R index e9674bc..bf5333a 100644 --- a/swank.R +++ b/swank.R @@ -368,6 +368,13 @@ computeRestartsForEmacs <- function (sldbState) { FALSE } +`swank:eval-string-in-frame` <- function(slimeConnection, sldbState, string, index) { + frame <- sldbState$frames[[1+index]] + withRetryRestart("retry SLIME interactive evaluation request", + value <- eval(parse(text=string), envir=frame)) + printToString(value) +} + `swank:frame-locals-and-catch-tags` <- function(slimeConnection, sldbState, index) { str(sldbState$frames) frame <- sldbState$frames[[1+index]]