From: Christophe Rhodes Date: Wed, 6 Apr 2011 08:11:08 +0000 (+0100) Subject: implement swank:interactive-eval-region X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=commitdiff_plain;h=f362dbb2a366f194cb12a336d99403287e09f8ae;ds=sidebyside implement swank:interactive-eval-region Because of our vaguely dodgy heuristic for finding the "defun" to evaluate, C-c C-c is not terribly useful. This allows at least C-c C-r to be used without thinking. --- diff --git a/swank.R b/swank.R index 34998b6..8c5bafd 100644 --- a/swank.R +++ b/swank.R @@ -494,6 +494,12 @@ withRetryRestart <- function(description, expr) { list(output, prin1ToString(value)) } +`swank:interactive-eval-region` <- function(slimeConnection, sldbState, string) { + withRetryRestart("retry SLIME interactive evaluation request", + value <- eval(parse(text=string), envir=globalenv())) + prin1ToString(value) +} + `swank:find-definitions-for-emacs` <- function(slimeConnection, sldbState, string) { if(exists(string, envir = globalenv())) { thing <- get(string, envir = globalenv())