M: link definer drop \ ARTICLE: \ ; ;
-M: link where name>> article loc>> ;
+M: link where name>> lookup-article loc>> ;
-M: link set-where name>> article loc<< ;
+M: link set-where name>> lookup-article loc<< ;
M: link forget* name>> remove-article ;
}
"Help article implementation:"
{ $subsections
- article
+ lookup-article
articles
}
"Links:"
: check-about ( vocab -- )
vocab-link boa dup
- '[ _ vocab-help [ article drop ] when* ] check-something ;
+ '[ _ vocab-help [ lookup-article drop ] when* ] check-something ;
: check-vocab ( vocab -- )
"Checking " write dup write "..." print flush
{ $description "Throws a " { $link no-article } " error." }
{ $error-description "Thrown by " { $link help } " if the given help topic does not exist, or if the help topic being displayed links to a help topic which does not exist." } ;
-HELP: article
+HELP: lookup-article
{ $values { "name" "an article name" } { "article" "an " { $link article } " object" } }
{ $description "Outputs a named " { $link article } " object." } ;
M: no-article summary
drop "Help article does not exist" ;
-: article ( name -- article )
+: lookup-article ( name -- article )
articles get ?at [ no-article ] unless ;
M: object valid-article? articles get key? ;
-M: object article-title article article-title ;
-M: object article-content article article-content ;
+M: object article-title lookup-article article-title ;
+M: object article-content lookup-article article-content ;
M: object article-parent article-xref get at ;
M: object set-article-parent article-xref get set-at ;
! Help support
-: fuel-get-article ( name -- ) article fuel-eval-set-result ;
+: fuel-get-article ( name -- ) lookup-article fuel-eval-set-result ;
: fuel-get-article-title ( name -- )
articles get at [ article-title ] [ f ] if* fuel-eval-set-result ;
: doc-location ( word -- loc ) props>> "help-loc" swap at get-loc ;
-: article-location ( name -- loc ) article loc>> get-loc ;
+: article-location ( name -- loc ) lookup-article loc>> get-loc ;
: get-vocabs ( -- seq ) all-vocab-names ;