]> rhodes.io Git - swankr.git/commitdiff
Christophe Weblog Wiki Code Publications Music
implement a default method for emacsInspect
authorChristophe Rhodes <csr21@cantab.net>
Sun, 12 Sep 2010 16:40:25 +0000 (17:40 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sun, 12 Sep 2010 16:40:25 +0000 (17:40 +0100)
Stands a chance of making the inspector not utterly annoying

swank.R

diff --git a/swank.R b/swank.R
index 3ab65ee02f1228d8b2c3423b41d33647f0fe4457..7ec3deab6d34d496c21f42a7dfa9013737aac619 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -533,6 +533,10 @@ emacsInspect <- function(object) {
   UseMethod("emacsInspect")
 }
 
+emacsInspect.default <- function(thing) {
+  c(list(paste("a ", class(thing)[[1]], sep=""), list(quote(`:newline`))))
+}
+
 emacsInspect.list <- function(list) {
   c(list("a list", list(quote(`:newline`))),
     mapply(function(name, value) { list(list(quote(`:line`), name, value)) },