From 4088bd066cbaad7a568cb7722b31dce9fd203bc3 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Fri, 13 Aug 2010 15:22:58 +0100 Subject: [PATCH] use a restart description for restart printing, if available --- swank.R | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/swank.R b/swank.R index a9b62c6..802b040 100644 --- a/swank.R +++ b/swank.R @@ -75,11 +75,19 @@ debuggerInfoForEmacs <- function(sldbState, from=0, to=NULL) { calls <- lapply(calls[from:to], { frameNumber <- from-1; function (x) { ret <- list(frameNumber, paste(format(x), sep="", collapse=" ")); frameNumber <<- 1+frameNumber; ret }}) } + computeRestartsForEmacs <- function () { + lapply(computeRestarts(sldbState$condition), + function(x) { + ## this is all a little bit internalsy + restartName <- x[[1]][[1]] + description <- restartDescription(x) + list(restartName, if(is.null(description)) restartName else description) + }) + } list(list(as.character(sldbState$condition), sprintf(" [%s]", class(sldbState$condition)[[1]]), FALSE), - lapply(computeRestarts(), function(x) list(x[[1]][[1]], x[[1]][[1]])), + computeRestartsForEmacs(), backtraceForEmacs(), list(sldbState$id)) -# lapply(calls[from:to], function(x) paste(format(x), sep="", collapse=" "))) } readPacket <- function(io) { -- 2.39.5