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 7ec3dea..e9674bc 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -591,3 +591,16 @@ emacsInspect.numeric <- function(numeric) {
     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)
+}