formatting

svn: r11860
This commit is contained in:
Eli Barzilay 2008-09-24 20:38:57 +00:00
parent 6bb96f95b0
commit 95526fbc5a

View File

@ -180,8 +180,8 @@
(let-values ([(defs inters) (unpack-submission submission)]) (let-values ([(defs inters) (unpack-submission submission)])
(parameterize ([current-input-port (parameterize ([current-input-port
(if textualize? (if textualize?
(input-port->text-input-port (open-input-text-editor (input-port->text-input-port
defs 0 'end snip->text)) (open-input-text-editor defs 0 'end snip->text))
(open-input-text-editor defs))] (open-input-text-editor defs))]
[current-output-port (open-output-bytes)]) [current-output-port (open-output-bytes)])
(input->process->output maxwidth textualize? untabify? bad-re) (input->process->output maxwidth textualize? untabify? bad-re)
@ -345,14 +345,15 @@
[keyvals '()] [keyvals '()]
[got null]) [got null])
(define (get key . default) (define (get key . default)
(cond [(assq key keyvals) => (lambda (x) (set! got (cons x got)) (caddr x))] (cond [(assq key keyvals)
=> (lambda (x) (set! got (cons x got)) (caddr x))]
[(pair? default) (car default)] [(pair? default) (car default)]
[else #f])) [else #f]))
(syntax-case stx () (syntax-case stx ()
[(key val x ...) [(key val x ...)
(and (identifier? #'key) (and (identifier? #'key)
(regexp-match? #rx"^:" (symbol->string (syntax-e #'key)))) (regexp-match? #rx"^:" (symbol->string (syntax-e #'key))))
(loop #'(x ...) (loop #'(x ...)
(cons (list (syntax-e #'key) #'key #'val) keyvals) (cons (list (syntax-e #'key) #'key #'val) keyvals)
(cons (syntax-e #'key) got))] (cons (syntax-e #'key) got))]
[(body ...) [(body ...)