Christophe Weblog Wiki Code Publications Music
less debugging output cruft in `swank:frame-locals-and-catch-tags`
[swankr.git] / swank.R
diff --git a/swank.R b/swank.R
index 4af51d133e1641891c38bf57a701e86523295d73..f0aee27babe75b918535f5a6efdae9264d70e78e 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -377,7 +377,6 @@ computeRestartsForEmacs <- function (sldbState) {
 }
 
 `swank:frame-locals-and-catch-tags` <- function(slimeConnection, sldbState, index) {
-  str(sldbState$frames)
   frame <- sldbState$frames[[1+index]]
   objs <- ls(envir=frame)
   list(lapply(objs, function(name) { list(quote(`:name`), name,
@@ -613,3 +612,22 @@ emacsInspect.numeric <- function(numeric) {
   object <- get(name, envir=frame)
   inspectObject(slimeConnection, object)
 }
+
+`swank:default-directory` <- function(slimeConnection, sldbState) {
+  getwd()
+}
+
+`swank:set-default-directory` <- function(slimeConnection, sldbState, directory) {
+  setwd(directory)
+  `swank:default-directory`(slimeConnection, sldbState)
+}
+
+`swank:load-file` <- function(slimeConnection, sldbState, filename) {
+  source(filename, local=FALSE)
+  TRUE
+}
+
+`swank:compile-file-for-emacs` <- function(slimeConnection, sldbState, filename, loadp, ...) {
+  times <- system.time(parse(filename))
+  list(quote(`:compilation-result`), list(), TRUE, times[3], substitute(loadp), filename)
+}