Christophe Weblog Wiki Code Publications Music
support ?help buffers
[swankr.git] / swank-media.R
index 01ea682932cf6bee1c5718c513301d906360ca74..1d7071d0a8b06e7b415a03138e91d43dfcf1482f 100644 (file)
@@ -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