X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=blobdiff_plain;f=swank.R;h=49f73fff2b1dd3e61e4294140a03f31f727252a0;hp=d91c35fdbd3663c3d8312a2a204a3e6a0ec73af7;hb=f26811f35b41594dbbc6c6c53b0d09fd819c152d;hpb=24bb738d87a1636b9b86850e14c59b608fe61fb9 diff --git a/swank.R b/swank.R index d91c35f..49f73ff 100644 --- a/swank.R +++ b/swank.R @@ -348,7 +348,16 @@ sendReplResultFunction <- sendReplResult } `swank:operator-arglist` <- function(slimeConnection, sldbState, op, package) { - list() + if(!exists(op, envir = globalenv())) { + return(list()) + } + funoid <- get(op, envir = globalenv()) + if(is.function(funoid)) { + args <- formals(funoid) + paste(sprintf("%s=%s", names(args), args), collapse=", ") + } else { + list() + } } `swank:throw-to-toplevel` <- function(slimeConnection, sldbState) {