Support optional priority in on-event
This commit is contained in:
parent
1334bd3abb
commit
0a0feee01b
|
@ -333,12 +333,13 @@
|
|||
|
||||
(define-syntax (on-event stx)
|
||||
(syntax-parse stx
|
||||
[(_ clause ...)
|
||||
[(_ prio:priority clause ...)
|
||||
(quasisyntax/loc stx
|
||||
(on-event* #,(source-location->string stx)
|
||||
(lambda (e)
|
||||
(core:match-event e
|
||||
clause ...))))]))
|
||||
clause ...))
|
||||
#:priority prio.level))]))
|
||||
|
||||
(define (on-event* where proc #:priority [priority *normal-priority*])
|
||||
(add-endpoint! where
|
||||
|
|
Loading…
Reference in New Issue