From: Christophe Rhodes Date: Sun, 12 Sep 2010 16:40:25 +0000 (+0100) Subject: implement a default method for emacsInspect X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=be1f5b0dd82335bdb4e096118c09e5cad859ac76;p=swankr.git implement a default method for emacsInspect Stands a chance of making the inspector not utterly annoying --- diff --git a/swank.R b/swank.R index 3ab65ee..7ec3dea 100644 --- 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)) },