[Roxygen-commits] r93 - in pkg: . R sandbox tests/runit

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jul 26 05:19:58 CEST 2008


Author: pcd
Date: 2008-07-26 05:19:58 +0200 (Sat, 26 Jul 2008)
New Revision: 93

Added:
   pkg/R/roxygen.R
Modified:
   pkg/DESCRIPTION
   pkg/R/Rd.R
   pkg/R/collate.R
   pkg/R/namespace.R
   pkg/R/parse.R
   pkg/R/roclet.R
   pkg/R/roxygenize.R
   pkg/R/string.R
   pkg/README
   pkg/sandbox/Rd.R
   pkg/sandbox/roxygenize.R
   pkg/tests/runit/runit.Rd.R
Log:
roxygen.R collated first with no-op; TODO regarding emacs and S3


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/DESCRIPTION	2008-07-26 03:19:58 UTC (rev 93)
@@ -7,5 +7,4 @@
         Manuel Eugster <Manuel.Eugster at stat.uni-muenchen.de>
 Maintainer: Peter Danenberg <pcd at roxygen.org>
 URL: http://roxygen.org
-Collate: 'functional.R' 'string.R' 'parse.R' 'collate.R' 'list.R' 'roclet.R' 'namespace.R' 'Rd.R' 'roxygenize.R'
-Suggests: R.utils
+Collate: 'roxygen.R' 'functional.R' 'string.R' 'parse.R' 'collate.R' 'list.R' 'roclet.R' 'namespace.R' 'Rd.R' 'roxygenize.R'

Modified: pkg/R/Rd.R
===================================================================
--- pkg/R/Rd.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/R/Rd.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -65,7 +65,7 @@
     gsub('\\\\[^{]*\\{([^}]*)(}|)',
          '\\1',
          string,
-         perl=T)
+         perl=TRUE)
 
   #' First sentence of a string, defined as first
   #' period, question mark or newline.
@@ -75,7 +75,7 @@
     description <- de.tex(description)
     r <- regexpr('[^.?\n]*(\\.(?!\\w)|\\?|\n|)',
                  description,
-                 perl=T)
+                 perl=TRUE)
     sentence <- substr(description, r, attr(r, 'match.length'))
     if (is.null.string(sentence))
       NULL

Modified: pkg/R/collate.R
===================================================================
--- pkg/R/collate.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/R/collate.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -1,3 +1,4 @@
+#' @include roxygen.R
 #' @include parse.R
 #' @include roclet.R
 #' @include string.R

Modified: pkg/R/namespace.R
===================================================================
--- pkg/R/namespace.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/R/namespace.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -1,3 +1,4 @@
+#' @include roxygen.R
 #' @include parse.R
 #' @include roclet.R
 #' @include string.R

Modified: pkg/R/parse.R
===================================================================
--- pkg/R/parse.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/R/parse.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -1,7 +1,8 @@
+#' @include roxygen.R
 #' @include string.R
 #' @include list.R
 #' @include functional.R
-NULL
+roxygen()
 
 #' Sequence that distinguishes roxygen comment from normal comment.
 LINE.DELIMITER <- '#\''
@@ -9,10 +10,6 @@
 #' Symbol that delimits tags.
 TAG.DELIMITER <- '@'
 
-#' No-op for sourceless files
-#' @return \code{NULL}
-roxygen <- function() NULL
-
 #' Comment blocks (possibly null) that precede a file's expressions.
 #' @param srcfile result of running \code{srcfile} on an interesting
 #' file

Modified: pkg/R/roclet.R
===================================================================
--- pkg/R/roclet.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/R/roclet.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -1,3 +1,4 @@
+#' @include roxygen.R
 #' @include list.R
 #' @include parse.R
 roxygen()

Added: pkg/R/roxygen.R
===================================================================
--- pkg/R/roxygen.R	                        (rev 0)
+++ pkg/R/roxygen.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -0,0 +1,3 @@
+#' No-op for sourceless files
+#' @return \code{NULL}
+roxygen <- function() NULL

Modified: pkg/R/roxygenize.R
===================================================================
--- pkg/R/roxygenize.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/R/roxygenize.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -1,3 +1,4 @@
+#' @include roxygen.R
 #' @include Rd.R
 #' @include namespace.R
 #' @include collate.R

Modified: pkg/R/string.R
===================================================================
--- pkg/R/string.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/R/string.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -1,6 +1,7 @@
+#' @include roxygen.R
 #' @include functional.R
 #' @include list.R
-NULL
+roxygen()
 
 #' Absense of words
 SPACE <- '[[:space:]]+'

Modified: pkg/README
===================================================================
--- pkg/README	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/README	2008-07-26 03:19:58 UTC (rev 93)
@@ -35,6 +35,12 @@
   the results of each roclet to appropriate files in a package
   skeleton.
 
+* Create some automatic method for detecting S3 methods without
+  resorting to @method <generic> <class>.
+
+* Edit the R emacs mode to identify roxygen delimiters when filling,
+  etc.
+
 1.3. BUGS
 
 * parse.formals doesn't distinguish between no default argument and

Modified: pkg/sandbox/Rd.R
===================================================================
--- pkg/sandbox/Rd.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/sandbox/Rd.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -13,6 +13,4 @@
 files <- if (argc > 0) as.list(argv) else FILES
 
 roclet <- make.Rd.roclet()
-## do.call(roclet$parse, files)
-roclet$parse.parsed(parse.text("#' Is a number odd?
-                   a <- 2"))
+do.call(roclet$parse, files)

Modified: pkg/sandbox/roxygenize.R
===================================================================
--- pkg/sandbox/roxygenize.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/sandbox/roxygenize.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -1,6 +1,7 @@
 if (!file.exists('pkg/R/parse.R'))
   stop('Run one directory above `pkg\'.')
 
+source('pkg/R/roxygen.R')
 source('pkg/R/functional.R')
 source('pkg/R/list.R')
 source('pkg/R/parse.R')

Modified: pkg/tests/runit/runit.Rd.R
===================================================================
--- pkg/tests/runit/runit.Rd.R	2008-07-26 03:19:39 UTC (rev 92)
+++ pkg/tests/runit/runit.Rd.R	2008-07-26 03:19:58 UTC (rev 93)
@@ -110,7 +110,7 @@
 test.title.from.description <- function()
   check.Rd.output("#' Description with sentence. That continueth.
                    a <- 2",
-                  output=c("\\title{Description with sentence}",
+                  output=c("\\title{Description with sentence.}",
                     "\\name{a}",
                     "\\alias{a}",
                     paste("\\description{Description with sentence.",
@@ -128,7 +128,7 @@
 test.ellipsis.on.no.period <- function()
   check.Rd.output("#' Whether a number is odd
                    is.odd <- function(a) {}",
-                  output=c('\\title{Whether a number is odd\dots}',
+                  output=c('\\title{Whether a number is odd\\dots}',
                     '\\name{is.odd}',
                     '\\alias{is.odd}',
                     '\\usage{is.odd(a)}',



More information about the Roxygen-commits mailing list