I submitted a PR for the following fix:
The original reference implementation relies on some Scheme that can invoke macro %M on the dotted form such as (%M arg arg2 . arg3), which is outside of R7RS. Specifically, such invocation appears after the initial macro (M (arg arg2 . arg3) ...) is expanded into (%M ... arg arg2 . arg3).
Gauche (and Chicken) doesn't support such enhancement, so the reference implementation excluded Gauche from supporting patterns like (M (arg arg2 . arg3) ...). The srfi text calls it "Rest arguments".
However, such pattern can be portably implemented within R7RS. You can expand (M (arg arg2 . arg3) ...) info (%M ... (arg arg2 . arg3)), and recurse over the list (arg arg2 . arg3)
(define-syntax %M
(syntax-rules ()
((_ args ())
;; terminal pattern without rest arg.
)
((_ (args ...) (arg . rest))
;; recurse
(%M (args ... arg) rest))
((_ args last)
;; terminal pattern with rest arg
)))
Checked on Gauche with uncommenting tests marked with "rest arg".
I believe Chicken can be made work with the same way, though I haven't tested it. I can make another PR after confirming it with Chicken.