X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=blobdiff_plain;f=swank.R;h=f395217bf92abe79767a55c5434bc015bb003781;hp=0684ab071366fca918bd5541c5aa2ed6e76f5b46;hb=2d372ae85cf0f1eacb4c44e3615499e0a29bf6b6;hpb=98e89761b295de170b77d10779a979f9da1a3d84 diff --git a/swank.R b/swank.R index 0684ab0..f395217 100644 --- a/swank.R +++ b/swank.R @@ -284,6 +284,21 @@ computeRestartsForEmacs <- function (sldbState) { } } +`swank:frame-source-location` <- function(io, sldbState, n) { + call <- sldbState$calls[[n+1]] + srcref <- attr(call, "srcref") + srcfile <- attr(srcref, "srcfile") + if(is.null(srcfile)) { + list(quote(`:error`), "no srcfile") + } else { + filename <- get("filename", srcfile) + list(quote(`:location`), + list(quote(`:file`), filename), + list(quote(`:line`), srcref[[1]], srcref[[2]]-1), + FALSE) + } +} + `swank:buffer-first-change` <- function(io, sldbState, filename) { FALSE }