From df9e80e09eb7639969fbcdb57899efe72688486b Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Fri, 3 Sep 2010 17:03:08 +0100 Subject: [PATCH] swank:value-for-editing and swank:commit-edited-value These are (in principle, at least) really, really easy. --- swank.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/swank.R b/swank.R index 0a309ef..488ad56 100644 --- 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 +} -- 2.39.5