X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=blobdiff_plain;f=swank.R;h=6dca4556d1bb69e787cb4622b8aef2ecd484199c;hp=0684ab071366fca918bd5541c5aa2ed6e76f5b46;hb=b7cfe0a0e9f9456e13c680cce0e302ee4c6c210a;hpb=98e89761b295de170b77d10779a979f9da1a3d84 diff --git a/swank.R b/swank.R index 0684ab0..6dca455 100644 --- a/swank.R +++ b/swank.R @@ -1,3 +1,18 @@ +### This program is free software; you can redistribute it and/or +### modify it under the terms of the GNU General Public Licence as +### published by the Free Software Foundation; either version 2 of the +### Licence, or (at your option) any later version. +### +### This program is distributed in the hope that it will be useful, +### but WITHOUT ANY WARRANTY; without even the implied warranty of +### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +### GNU General Public Licence for more details. +### +### A copy of version 2 of the GNU General Public Licence is available +### at ; the +### latest version of the GNU General Public Licence is available at +### . + swank <- function(port=4005) { acceptConnections(port, FALSE) } @@ -284,6 +299,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 }