Christophe Weblog Wiki Code Publications Music
make swank:listener-eval be a bit more like the CL version
authorChristophe Rhodes <csr21@cantab.net>
Mon, 30 Aug 2010 18:55:59 +0000 (19:55 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Mon, 30 Aug 2010 18:55:59 +0000 (19:55 +0100)
don't return (:ok (:values "string")); instead, send a separate
(:write-string "string" :repl-result) and return (:ok ())

swank.R

diff --git a/swank.R b/swank.R
index c0a3ce547c2574860ac46a9b3f13e72b9268166b..578d61c75a83f45f2a82081d9a09d89dc10d243e 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -249,7 +249,8 @@ printToString <- function(val) {
 `swank:listener-eval` <- function(slimeConnection, sldbState, string) {
   val <- eval(parse(text=string), envir = globalenv())
   string <- printToString(val)
-  list(quote(`:values`), paste(string, collapse="\n"))
+  sendToEmacs(slimeConnection, list(quote(`:write-string`), paste(string, collapse="\n"), quote(`:repl-result`)))
+  list()
 }
 
 `swank:autodoc` <- function(slimeConnection, sldbState, rawForm, ...) {