]> gitweb.factorcode.org Git - factor.git/commitdiff
parser: Consider private words now for autocompletes, but to avoid pulling in private...
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 27 Oct 2014 19:01:37 +0000 (12:01 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 27 Oct 2014 19:01:37 +0000 (12:01 -0700)
core/parser/parser.factor

index 9060fa15573c0bb73425c4e35da84f1d80621747..4833e079d1bbf8de7b83ed4dad7888349f7ec011 100644 (file)
@@ -36,14 +36,15 @@ SYMBOL: auto-use?
 
 : private? ( word -- ? ) vocabulary>> ".private" tail? ;
 
-: ignore-privates ( seq -- seq' )
-    dup [ private? ] all? [ [ private? not ] filter ] unless ;
-
 : no-word ( name -- newword )
     dup words-named ignore-forwards
-    dup ignore-privates dup length 1 = auto-use? get and
-    [ 2nip first no-word-restarted ]
-    [ drop <no-word-error> throw-restarts no-word-restarted ]
+    dup length 1 = auto-use? get and
+    [
+        dup first private?
+        [ <no-word-error> throw-restarts no-word-restarted ]
+        [ nip first no-word-restarted ] if
+    ]
+    [ <no-word-error> throw-restarts no-word-restarted ]
     if ;
 
 : parse-word ( string -- word )