From: Christophe Rhodes Date: Sun, 12 Sep 2010 16:40:48 +0000 (+0100) Subject: implement swank:inspect-current-condition and swank:inspect-frame-var X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=8cfc9d8ac69ca55d48cc615de510c32fddad61da;p=swankr.git implement swank:inspect-current-condition and swank:inspect-frame-var --- diff --git a/swank.R b/swank.R index 7ec3dea..e9674bc 100644 --- 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) +}