Christophe Weblog Wiki Code Publications Music
support ?help buffers
authorChristophe Rhodes <csr21@cantab.net>
Tue, 13 Sep 2011 11:40:20 +0000 (12:40 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Tue, 13 Sep 2011 11:40:20 +0000 (12:40 +0100)
use new fancy :popup-buffer event in slime-media.

BUGS.org
swank-media.R

index f8b4be64787eee313beacddc74338f5e55568ea6..24cd075174228f79450ef6e0402050bbfdc12323 100644 (file)
--- a/BUGS.org
+++ b/BUGS.org
@@ -28,7 +28,7 @@
 * RESOLVED #8 startup is not filesystem-location independent    :MINOR:FIXED:
   Requires the cwd to be the swankr directory to be able to find
   swank-presentations and swank-media
 * RESOLVED #8 startup is not filesystem-location independent    :MINOR:FIXED:
   Requires the cwd to be the swankr directory to be able to find
   swank-presentations and swank-media
-* OPEN #9 help and ? to produce help buffers                       :WISHLIST:
+* RESOLVED #9 help and ? to produce help buffers             :WISHLIST:FIXED:
   Not like ESS, though: that works by looking at the user's input with
   a regexp.  Use slime-media?
 * RESOLVED #10 0 or more than 1 exprs at REPL                   :MINOR:FIXED:
   Not like ESS, though: that works by looking at the user's input with
   a regexp.  Use slime-media?
 * RESOLVED #10 0 or more than 1 exprs at REPL                   :MINOR:FIXED:
index 01ea682932cf6bee1c5718c513301d906360ca74..1d7071d0a8b06e7b415a03138e91d43dfcf1482f 100644 (file)
@@ -41,4 +41,12 @@ makeMediaReplResult.matrix <- function(value) {
   makeMediaReplResult.default(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
 makeReplResultFunction <- makeMediaReplResult