From be1f5b0dd82335bdb4e096118c09e5cad859ac76 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sun, 12 Sep 2010 17:40:25 +0100 Subject: [PATCH] implement a default method for emacsInspect Stands a chance of making the inspector not utterly annoying --- swank.R | 4 ++++ 1 file changed, 4 insertions(+) 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)) }, -- 2.39.5