/*  --- University of Sussex POPLOG file -----------------------------------
 *  File:           $usepop/master/C.unix/lib/auto/explain.p
 *  Purpose:        finding and printing help file without ved.
 *  Author:         Aaron Sloman, March 1984 (see revisions)
 *  Documentation:  HELP * EXPLAIN
 *  Related Files:
 */

section;

define global macro explain;
lvars topic topfile;
vars popnewline;
    true -> popnewline;
    rdstringto([; ^termin ^newline]) ->> topic -> topfile;
    false -> popnewline;
    sysfileok(topfile sys_>< '')   -> topfile;
    vedgetlibfilename(vedhelplist,"vedhelpname",topfile) -> topfile;
    unless topfile do
        mishap('NO HELP AVAILABLE', [%topic%])
    elseif islist(topfile) then
        hd(topfile) -> topfile;
    endunless;
    sysobey('more ' >< topfile);
enddefine;

endsection;

/*  --- Revision History ---------------------------------------------------
--- Mark Rubinstein, Sep 16 1985 - lvarsed, de-sectionised and made to work
    with new (optional) help list format.
 */
