vocabs:vocab-name* => editors.private:public-vocab-name.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs calendar continuations debugger
definitions io io.launcher io.pathnames kernel namespaces
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs calendar continuations debugger
definitions io io.launcher io.pathnames kernel namespaces
-prettyprint sequences source-files.errors strings threads
-tools.crossref vocabs vocabs.files vocabs.hierarchy
+prettyprint sequences source-files.errors splitting strings
+threads tools.crossref vocabs vocabs.files vocabs.hierarchy
vocabs.loader vocabs.metadata words ;
IN: editors
vocabs.loader vocabs.metadata words ;
IN: editors
+<PRIVATE
+
+: public-vocab-name ( vocab-spec -- name )
+ vocab-name ".private" ?tail drop ;
+
+PRIVATE>
+
: edit-vocab ( vocab -- )
: edit-vocab ( vocab -- )
- vocab-name* >vocab-link edit ;
+ public-vocab-name >vocab-link edit ;
GENERIC: edit ( object -- )
GENERIC: edit ( object -- )
GENERIC: edit-docs ( object -- )
M: object edit-docs
GENERIC: edit-docs ( object -- )
M: object edit-docs
- vocab-name* vocab-docs-path 1 edit-location ;
+ public-vocab-name vocab-docs-path 1 edit-location ;
M: word edit-docs
dup "help-loc" word-prop
M: word edit-docs
dup "help-loc" word-prop
GENERIC: edit-tests ( object -- )
M: object edit-tests
GENERIC: edit-tests ( object -- )
M: object edit-tests
- vocab-name* vocab-tests-path 1 edit-location ;
+ public-vocab-name vocab-tests-path 1 edit-location ;
M: word edit-tests vocabulary>> edit-tests ;
M: word edit-tests vocabulary>> edit-tests ;
M: object vocab-name check-vocab-name ;
M: object vocab-name check-vocab-name ;
-: vocab-name* ( vocab-spec -- name )
- vocab-name ".private" ?tail drop ;
-
-: private-vocab? ( vocab-spec -- ? )
- vocab-name ".private" tail? ;
-
GENERIC: lookup-vocab ( vocab-spec -- vocab )
M: vocab lookup-vocab ;
GENERIC: lookup-vocab ( vocab-spec -- vocab )
M: vocab lookup-vocab ;
GENERIC: require ( object -- )
M: vocab require name>> require ;
GENERIC: require ( object -- )
M: vocab require name>> require ;
M: vocab-link require name>> require ;
! When calling "foo.private" require, load "foo" instead, but only when
M: vocab-link require name>> require ;
! When calling "foo.private" require, load "foo" instead, but only when