X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=blobdiff_plain;f=swank-media.R;h=59f7d772e9c2e9e67f664b522c180981fa84ef78;hp=01ea682932cf6bee1c5718c513301d906360ca74;hb=22705b4ae5466d59d3312a1cda4c0cb5e1ca52ea;hpb=03de6608402c91c474d0e5fb57569631ded3701a diff --git a/swank-media.R b/swank-media.R index 01ea682..59f7d77 100644 --- a/swank-media.R +++ b/swank-media.R @@ -30,7 +30,7 @@ makeMediaReplResult.numeric <- function(value) { list(quote(`:write-string`), string, quote(`:repl-result`)) } makeMediaReplResult.complex <- function(value) { - string <- deparse(value) + string <- paste(deparse(value), sep="", collapse="\n") list(quote(`:write-string`), string, quote(`:repl-result`)) } @@ -41,4 +41,12 @@ makeMediaReplResult.matrix <- function(value) { makeMediaReplResult.default(value) } +makeMediaReplResult.help_files_with_topic <- function(value) { + output <- capture.output(tools:::Rd2txt(utils:::.getHelpFile(value), + options=list(underline_titles=FALSE))) + string <- paste(output, collapse="\n") + list(quote(`:popup-buffer`), sprintf("*slime-help(%s)*", attr(value, "topic")), + string, quote(`ess-help-mode`)) +} + makeReplResultFunction <- makeMediaReplResult