From: Christophe Rhodes Date: Mon, 30 Aug 2010 20:45:48 +0000 (+0100) Subject: A proper implementation of swank:swank-require X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=commitdiff_plain;h=2c0d53bc49f3dd18df3227759ba4ff40c8535ee5 A proper implementation of swank:swank-require We can do this nicely now that we have an evaluator of :emacs-rex forms that can cope with quote. --- diff --git a/swank.R b/swank.R index b9d89cb..e6e78c7 100644 --- a/swank.R +++ b/swank.R @@ -259,6 +259,12 @@ printToString <- function(val) { } `swank:swank-require` <- function (slimeConnection, sldbState, contribs) { + for(contrib in contribs) { + filename <- sprintf("%s.R", as.character(contrib)) + if(file.exists(filename)) { + source(filename, verbose=TRUE) + } + } list() }