Christophe Weblog Wiki Code Publications Music
implement swank:inspect-current-condition and swank:inspect-frame-var
authorChristophe Rhodes <csr21@cantab.net>
Sun, 12 Sep 2010 16:40:48 +0000 (17:40 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sun, 12 Sep 2010 16:40:48 +0000 (17:40 +0100)
swank.R

diff --git a/swank.R b/swank.R
index 7ec3deab6d34d496c21f42a7dfa9013737aac619..e9674bc7f175276229aec93e08d386a2375e4664 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -591,3 +591,16 @@ emacsInspect.numeric <- function(numeric) {
     eval(expr, envir=globalenv())
   }
 }
     eval(expr, envir=globalenv())
   }
 }
+
+`swank:inspect-current-condition` <- function(slimeConnection, sldbState) {
+  resetInspector(slimeConnection)
+  inspectObject(slimeConnection, sldbState$condition)
+}
+
+`swank:inspect-frame-var` <- function(slimeConnection, sldbState, frame, var) {
+  resetInspector(slimeConnection)
+  frame <- sldbState$frames[[1+frame]]
+  name <- ls(envir=frame)[[1+var]]
+  object <- get(name, envir=frame)
+  inspectObject(slimeConnection, object)
+}