X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=blobdiff_plain;f=swank.R;h=8ba9060f6147a47956ba4e6e18a8d4a8ebd9be45;hp=757e2430752b00ce87724f82ccfbd0d6dfbb5dbe;hb=22705b4ae5466d59d3312a1cda4c0cb5e1ca52ea;hpb=cc42bfe8c3d5947b34c3d497260d8411b1f4442b diff --git a/swank.R b/swank.R index 757e243..8ba9060 100644 --- a/swank.R +++ b/swank.R @@ -525,6 +525,12 @@ computeRestartsForEmacs <- function (sldbState) { if(mode(s) == "name") { return(s) } + if(is(s, "srcref")) { + ## more monumental KLUDGE: parsing (in 2.14, at least) appears + ## to put srcrefs directly in `length 2' objects, which we need + ## to frob directly. + return(frob(list(s))[[1]]) + } srcrefs <- attr(s, "srcref") attribs <- attributes(s) new <- @@ -536,6 +542,9 @@ computeRestartsForEmacs <- function (sldbState) { if(!is.null(attr(s, "srcref"))) { attr(new, "srcref") <- frob(srcrefs) } + if(!is.null(attr(s, "wholeSrcref"))) { + attr(new, "wholeSrcref") <- frob(list(attr(s, "wholeSrcref")))[[1]] + } new } withRestarts({