From e6e28fa8b7ee4f4b0df824c0c6aa95bfdeed23a1 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 26 Dec 2019 07:02:01 -0600 Subject: [PATCH] cs: further corrections to `racket` command-line argument handling --- racket/src/cs/main.sps | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/racket/src/cs/main.sps b/racket/src/cs/main.sps index 50257c87b4..49f0f13d6c 100644 --- a/racket/src/cs/main.sps +++ b/racket/src/cs/main.sps @@ -322,6 +322,7 @@ [else (set! remaining-command-line-arguments (vector->immutable-vector (list->vector args))) + (no-init! saw) (when (and (null? args) (not (saw? saw 'non-config))) (set! repl? #t) (when text-repl? @@ -359,7 +360,7 @@ (let-values ([(file-name rest-args) (next-arg "file name" arg within-arg args)]) (set! loads (cons (lambda () (load file-name)) loads)) - (flags-loop rest-args (see saw 'non-config)))] + (flags-loop rest-args (see saw 'non-config 'top)))] [("-r" "--script") (let-values ([(file-name rest-args) (next-arg "file name" arg within-arg args)]) (set! loads (cons (lambda () (load file-name)) @@ -390,7 +391,7 @@ vals))) (loop)))) loads)) - (flags-loop rest-args (see saw 'non-config)))] + (flags-loop rest-args (see saw 'non-config 'top)))] [("-k") (let*-values ([(n rest-args) (next-arg "starting and ending offsets" arg within-arg args)] [(m rest-args) (next-arg "first ending offset" arg within-arg (cons "-k" rest-args))] @@ -416,7 +417,7 @@ [("-m" "--main") (set! loads (cons (lambda () (call-main)) loads)) - (flags-loop (cdr args) (see saw 'non-config))] + (flags-loop (cdr args) (see saw 'non-config 'top))] [("-i" "--repl") (set! repl? #t) (set! version? #t)