[Sciviews-commits] r60 - pkg/svMisc/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 13 18:31:04 CEST 2008
Author: romain
Date: 2008-10-13 18:31:04 +0200 (Mon, 13 Oct 2008)
New Revision: 60
Modified:
pkg/svMisc/R/CompletePlus.R
pkg/svMisc/R/descFun.R
Log:
added descSquare to handle completions with "["
Modified: pkg/svMisc/R/CompletePlus.R
===================================================================
--- pkg/svMisc/R/CompletePlus.R 2008-10-13 08:29:20 UTC (rev 59)
+++ pkg/svMisc/R/CompletePlus.R 2008-10-13 16:31:04 UTC (rev 60)
@@ -69,12 +69,19 @@
out[ test.dollar, 3 ] <- descSlots( object, slots, package = pack )
}
+ ### deal with completions with "["
+ if( length(test.square <- grep("\\[", comps)) ){
+ elements <- comps[ test.square ]
+ out[ test.square, 2 ] <- ""
+ out[ test.square, 3 ] <- descSquare( elements, package = pack )
+ }
+
### TODO: do not know what to do with these
test.others <- grep(" ", comps)
# TODO: are there other kind of completions I miss here
### deal with function completions
- test.fun <- setdiff(1:length(comps), c(test.arg, test.pack, test.others, test.dollar, test.slot))
+ test.fun <- setdiff(1:length(comps), c(test.arg, test.pack, test.others, test.dollar, test.slot, test.square))
if (length(test.fun)) {
funs <- comps[test.fun]
packs <- find.multiple( funs )
Modified: pkg/svMisc/R/descFun.R
===================================================================
--- pkg/svMisc/R/descFun.R 2008-10-13 08:29:20 UTC (rev 59)
+++ pkg/svMisc/R/descFun.R 2008-10-13 16:31:04 UTC (rev 60)
@@ -46,6 +46,9 @@
character( length( slots ) )
}
+descSquare <- function( completions, package = NULL ){
+ character( length( completions ))
+}
descArgs <-
function (fun, args = NULL, package = NULL, lib.loc = NULL) {
More information about the Sciviews-commits
mailing list