emode-disphelp.red 526 B

1234567891011121314151617
  1. % Stolen from PI:HELP.RED--modified to run under EMODE.
  2. lisp procedure DisplayHelpFile F; %. Type help about 'F'
  3. begin scalar NewIn, C, !*Echo;
  4. (lambda(!*Lower);
  5. F := BldMsg(HelpFileFormat!*, F))(T);
  6. NewIn := ErrorSet(list('Open, MkQuote F, '(quote Input)), NIL, NIL);
  7. if not PairP NewIn then
  8. ErrorPrintF("*** Couldn't find help file %r", F)
  9. else
  10. << NewIn := car NewIn;
  11. SelectBuffer('ALTERNATE_WINDOW);
  12. read_channel_into_buffer(NewIn); % (Closes NewIn when done.)
  13. >>;
  14. end;