From f26811f35b41594dbbc6c6c53b0d09fd819c152d Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Tue, 24 Apr 2012 13:38:09 +0100 Subject: [PATCH 1/1] implement `swank:operator-arglist` properly Now that slime-operator-at-point is overrideable, I can even test this from within Emacs -- but thanks to Philipp Marek for implementing this in his SLIMV-based environment first. --- swank.R | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) { -- 2.30.2