From f1072f827de0f081c7e6c7f4f11e195a3dcbf3ce Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 13 Dec 2007 15:04:20 +0000 Subject: [PATCH] new scheme/cmdline, refine -r/-u to imply -N svn: r7989 original commit: 138a38ea04bce3f7f3294887eaae6e980e91b3e5 --- collects/help/help.ss | 17 +++++++---------- collects/help/search.ss | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/collects/help/help.ss b/collects/help/help.ss index 4008939b..24a3c722 100644 --- a/collects/help/help.ss +++ b/collects/help/help.ss @@ -1,18 +1,15 @@ #lang scheme/base (require "search.ss" - net/sendurl ; browser/external + net/sendurl setup/dirs - mzlib/cmdline) + scheme/cmdline) -(define search-terms '()) -(command-line "Help Desk" - (current-command-line-arguments) - (args search-term (set! search-terms search-term))) - -(cond - [(null? search-terms) +(command-line + #:args search-term + (cond + [(null? search-term) (let ([dest-path (build-path (find-doc-dir) "start" "index.html")]) (send-url (format "file://~a" (path->string dest-path))))] [else - (generate-search-results search-terms)]) + (generate-search-results search-term)])) diff --git a/collects/help/search.ss b/collects/help/search.ss index 8dc5c002..39f8ff44 100644 --- a/collects/help/search.ss +++ b/collects/help/search.ss @@ -7,7 +7,7 @@ scribble/basic scribble/manual (prefix-in scheme: scribble/scheme) - net/sendurl ; browser/external + net/sendurl mzlib/contract) (provide/contract