From 54c4388a6859a5d4684585522d430c439b4ada82 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 11 Jun 2015 20:04:01 -0700 Subject: [PATCH] vocabs: remove little used words. vocabs:vocab-name* => editors.private:public-vocab-name. --- basis/editors/editors.factor | 17 ++++++++++++----- core/vocabs/vocabs.factor | 7 +------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/basis/editors/editors.factor b/basis/editors/editors.factor index 8e4802c17b..7b785bac41 100644 --- a/basis/editors/editors.factor +++ b/basis/editors/editors.factor @@ -2,8 +2,8 @@ ! 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 @@ -53,8 +53,15 @@ M: cannot-find-source error. DEFER: edit + + : edit-vocab ( vocab -- ) - vocab-name* >vocab-link edit ; + public-vocab-name >vocab-link edit ; GENERIC: edit ( object -- ) @@ -89,7 +96,7 @@ M: string edit edit-vocab ; 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 @@ -100,7 +107,7 @@ M: word edit-docs 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 ; diff --git a/core/vocabs/vocabs.factor b/core/vocabs/vocabs.factor index a8dd27f2e9..66f706eac7 100644 --- a/core/vocabs/vocabs.factor +++ b/core/vocabs/vocabs.factor @@ -41,12 +41,6 @@ M: vocab-link vocab-name 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 ; @@ -148,6 +142,7 @@ INSTANCE: vocab-spec definition-mixin 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 -- 2.34.1