[Sciviews-commits] r57 - pkg/svMisc/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 13 09:12:26 CEST 2008


Author: romain
Date: 2008-10-13 09:12:26 +0200 (Mon, 13 Oct 2008)
New Revision: 57

Modified:
   pkg/svMisc/R/CompletePlus.R
   pkg/svMisc/R/descFun.R
Log:
split arguments with ", *" instead of ", " in descArgs

Modified: pkg/svMisc/R/CompletePlus.R
===================================================================
--- pkg/svMisc/R/CompletePlus.R	2008-10-05 13:59:40 UTC (rev 56)
+++ pkg/svMisc/R/CompletePlus.R	2008-10-13 07:12:26 UTC (rev 57)
@@ -31,9 +31,6 @@
     out <- matrix("", nrow = length(comps), ncol = 3)
     out[, 1] <- comps
 
-    # TODO: look at utils:::.win32consoleCompletion and figure out if the
-	# "additions" can be useful
-
     ### deal with packages (completions ending with ::)
     if (length(test.pack <- grep("::", comps)))
 		out[test.pack, 3] <- sapply(sub("::", "", comps[test.pack]),
@@ -41,17 +38,16 @@
 
     ### deal with argument completions (ending with =)
     if (length(test.arg <- grep("=", comps))) {
-		arg <- sub("=$", "", comps[test.arg])
-		fguess <- utils:::.CompletionEnv[["fguess"]]
-		pack <- sub( "^package:", "", find(fguess)[1])
-		if(pack == ".GlobalEnv") {
-			out[test.arg, 3] <- ""
-		} else{
-			out[test.arg, 2] <- fguess
-			#out[test.arg, 3] <- .extract_argument_description(pack, fguess, arg)
-			out[test.arg, 3] <- descArgs(fguess, arg, pack)
-		}
-    }
+			arg <- sub("=$", "", comps[test.arg])
+			fguess <- utils:::.CompletionEnv[["fguess"]]
+			pack <- sub( "^package:", "", find(fguess)[1])
+			if(pack == ".GlobalEnv") {
+				out[test.arg, 3] <- ""
+			} else{
+				out[test.arg, 2] <- fguess
+				out[test.arg, 3] <- descArgs(fguess, arg, pack)
+			}
+    }     
 
     ### TODO: do not know what to do with these
     test.others <- grep(" ", comps)

Modified: pkg/svMisc/R/descFun.R
===================================================================
--- pkg/svMisc/R/descFun.R	2008-10-05 13:59:40 UTC (rev 56)
+++ pkg/svMisc/R/descFun.R	2008-10-13 07:12:26 UTC (rev 57)
@@ -76,7 +76,7 @@
 	res <- tapply(argsDesc, cumsum(argsFirstLine), paste, collapse = " ")
 	res <- as.vector(res)
 	# Create multiple entries for "arg1, arg2, ..."
-	argsNames <- strsplit(argsNames, ", ")
+	argsNames <- strsplit(argsNames, ", *")
 	Times <- sapply(argsNames, length)
 	res <- rep(res, Times)
 	names(res) <- unlist(argsNames)



More information about the Sciviews-commits mailing list