]> rhodes.io Git - swankr.git/commitdiff
Christophe Weblog Wiki Code Publications Music
implement swank:eval-string-in-frame
authorChristophe Rhodes <csr21@cantab.net>
Sun, 12 Sep 2010 17:06:26 +0000 (18:06 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sun, 12 Sep 2010 17:06:26 +0000 (18:06 +0100)
Reified environments make quite a lot of this fairly easy...

swank.R

diff --git a/swank.R b/swank.R
index e9674bc7f175276229aec93e08d386a2375e4664..bf5333a3d94f450a69fbe48aaa36f9dbb552f8da 100644 (file)
--- 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]]