]> rhodes.io Git - swankr.git/commitdiff
Christophe Weblog Wiki Code Publications Music
swank:value-for-editing and swank:commit-edited-value
authorChristophe Rhodes <csr21@cantab.net>
Fri, 3 Sep 2010 16:03:08 +0000 (17:03 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 3 Sep 2010 16:03:08 +0000 (17:03 +0100)
These are (in principle, at least) really, really easy.

swank.R

diff --git a/swank.R b/swank.R
index 0a309ef7da9b22576d945c26984874f6aa58ef88..488ad56943417d0414b9eba804fc14d63cd0a4b1 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -448,3 +448,13 @@ computeRestartsForEmacs <- function (sldbState) {
     list()
   }
 }
+
+`swank:value-for-editing` <- function(slimeConnection, sldbState, string) {
+  paste(deparse(eval(parse(text=string), envir = globalenv()), control="all"),
+        collapse="\n", sep="")
+}
+
+`swank:commit-edited-value` <- function(slimeConnection, sldbState, string, value) {
+  eval(parse(text=sprintf("%s <- %s", string, value)), envir = globalenv())
+  TRUE
+}