debuggerInfoForEmacs <- function(sldbState, from=0, to=NULL) {
backtraceForEmacs <- function() {
- calls <- sys.calls()
+ calls <- rev(sys.calls())
if(is.null(to)) to <- length(calls)
from <- from+1
calls <- lapply(calls[from:to], { frameNumber <- from-1;
}
`swank:listener-eval` <- function(io, sldbState, string) {
- val <- eval(parse(text=string))
+ val <- eval(parse(text=string), envir = globalenv())
f <- fifo("")
sink(f)
print(val)
`swank:debugger-info-for-emacs` <- function(io, sldbState, from, to) {
debuggerInfoForEmacs(sldbState, from=from, to=to)
}
+
+`swank:invoke-nth-restart-for-emacs` <- function(io, sldbState, level, n) {
+ if(sldbState$level == level) {
+ invokeRestart(computeRestarts()[[n+1]])
+ }
+}