help.vocabs: inform the user when browsing a vocab that is not loaded.
parent
8b666df6da
commit
83f2a48853
|
@ -227,6 +227,15 @@ C: <vocab-author> vocab-author
|
||||||
] bi
|
] bi
|
||||||
] unless-empty ;
|
] unless-empty ;
|
||||||
|
|
||||||
|
: vocab-is-not-loaded ( vocab -- )
|
||||||
|
"Attention" $heading
|
||||||
|
vocab-name dup "The " " vocabulary is not loaded. In order to browse "
|
||||||
|
"its documentation, you must first load it." append surround print-element
|
||||||
|
"USE: " prepend 1array $code ;
|
||||||
|
|
||||||
|
: describe-words ( vocab -- )
|
||||||
|
dup vocab [ words $words ] [ vocab-is-not-loaded ] if ;
|
||||||
|
|
||||||
: words. ( vocab -- )
|
: words. ( vocab -- )
|
||||||
last-element off
|
last-element off
|
||||||
[ require ] [ words $words ] bi nl ;
|
[ require ] [ words $words ] bi nl ;
|
||||||
|
@ -243,7 +252,7 @@ C: <vocab-author> vocab-author
|
||||||
first {
|
first {
|
||||||
[ describe-help ]
|
[ describe-help ]
|
||||||
[ describe-metadata ]
|
[ describe-metadata ]
|
||||||
[ words $words ]
|
[ describe-words ]
|
||||||
[ describe-files ]
|
[ describe-files ]
|
||||||
[ describe-children ]
|
[ describe-children ]
|
||||||
} cleave ;
|
} cleave ;
|
||||||
|
|
Loading…
Reference in New Issue