defthing: use #:id expression instead of 'id'
Change implementation of `defthing` so that if the user gives an `id-expr` via the `#:id` keyword, then `defthing` never uses the default `id`.
This commit is contained in:
parent
6e00000bb5
commit
e2ea830361
|
@ -1039,12 +1039,13 @@
|
||||||
#'(with-togetherable-racket-variables
|
#'(with-togetherable-racket-variables
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
|
(let ([id-val id-expr])
|
||||||
(*defthing kind.kind
|
(*defthing kind.kind
|
||||||
lt.expr
|
lt.expr
|
||||||
(list (or id-expr (quote-syntax/loc id))) (list 'id) #f
|
(list (or id-val (quote-syntax/loc id))) (list (or id-val 'id)) #f
|
||||||
(list (racketblock0 result))
|
(list (racketblock0 result))
|
||||||
(lambda () (list desc ...))
|
(lambda () (list desc ...))
|
||||||
(list (result-value value.value))))]))
|
(list (result-value value.value)))))]))
|
||||||
|
|
||||||
(define-syntax (defthing* stx)
|
(define-syntax (defthing* stx)
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
|
|
Loading…
Reference in New Issue
Block a user