Christophe Weblog Wiki Code Publications Music
implement swank:inspector-pop and swank:inspector-next
authorChristophe Rhodes <csr21@cantab.net>
Fri, 10 Sep 2010 21:53:44 +0000 (22:53 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 10 Sep 2010 21:53:44 +0000 (22:53 +0100)
Wow, nearly working.  There's some way of causing R to get into the
proper debugger; not sure how to reproduce it yet.

swank.R

diff --git a/swank.R b/swank.R
index d72103fc309fc33c57b5c9cd0ca13f4eaa60ac36..ce85b6997a5b20e08937aaa9d6fb04af9ed7af12 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -558,3 +558,21 @@ emacsInspect.numeric <- function(numeric) {
   object <- `swank:inspector-nth-part`(slimeConnection, sldbState, index)
   inspectObject(slimeConnection, object)
 }
   object <- `swank:inspector-nth-part`(slimeConnection, sldbState, index)
   inspectObject(slimeConnection, object)
 }
+
+`swank:inspector-pop` <- function(slimeConnection, sldbState) {
+  if(!is.null(slimeConnection$istate$previous)) {
+    slimeConnection$istate <- slimeConnection$istate$previous
+    istateToElisp(slimeConnection$istate)
+  } else {
+    FALSE
+  }
+}
+
+`swank:inspector-next` <- function(slimeConnection, sldbState) {
+  if(!is.null(slimeConnection$istate$`next`)) {
+    slimeConnection$istate <- slimeConnection$istate$`next`
+    istateToElisp(slimeConnection$istate)
+  } else {
+    FALSE
+  }
+}