vocabs.loader: one vocab-exists? word.

char-rename
John Benediktsson 2016-07-16 16:21:45 -07:00
parent abbefc96b9
commit ccbde89968
2 changed files with 3 additions and 3 deletions

View File

@ -44,9 +44,6 @@ M: interactor manifest>>
manifest swap assoc-stack
] if ;
: vocab-exists? ( name -- ? )
'[ _ { [ lookup-vocab ] [ find-vocab-root ] } 1|| ] [ drop f ] recover ;
GENERIC: (word-at-caret) ( token completion-mode -- obj )
M: vocab-completion (word-at-caret)

View File

@ -55,6 +55,9 @@ PRIVATE>
] if
] cache ;
: vocab-exists? ( name -- ? )
dup lookup-vocab [ ] [ find-vocab-root ] ?if ;
: vocab-append-path ( vocab path -- newpath )
swap find-vocab-root [ prepend-path ] [ drop f ] if* ;