From 62825b54e48ad5a32808c13cc183c5c78c5cf672 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Thu, 7 Oct 2010 23:09:09 +0100 Subject: [PATCH] more working `swank:compile-file-for-emacs` Firstly, only parse, don't source, as that seems to be the protocol (the emacs side is responsible for requesting a load if desired). Secondly, the protocol is also to return a compilation-result structure rather than just TRUE, so do that too. --- swank.R | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/swank.R b/swank.R index 22cec64..fe60f7d 100644 --- a/swank.R +++ b/swank.R @@ -629,10 +629,6 @@ emacsInspect.numeric <- function(numeric) { } `swank:compile-file-for-emacs` <- function(slimeConnection, sldbState, filename, loadp, ...) { - if(loadp==quote(`t`)) { - source(filename, local=FALSE) - } else { - parse(filename) - } - TRUE + times <- system.time(parse(filename)) + list(quote(`:compilation-result`), list(), TRUE, times[3], substitute(loadp), filename) } -- 2.30.2