Christophe Weblog Wiki Code Publications Music
`swank:describe-function` and `swank:describe-symbol` implementations
[swankr.git] / swank-media.R
index 1d7071d0a8b06e7b415a03138e91d43dfcf1482f..12405265e31de9d8285fa128e98d9a68c21838f1 100644 (file)
@@ -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`))
 }
 
@@ -42,9 +42,7 @@ makeMediaReplResult.matrix <- function(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")
+  string <- helpFilesWithTopicString(value)
   list(quote(`:popup-buffer`), sprintf("*slime-help(%s)*", attr(value, "topic")),
        string, quote(`ess-help-mode`))
 }