Subject: Re: bug#6384: Teach rx explicitly numbered submatches

From: Juri Linkov <[email-masked]>
Date: Thu, 10 Jun 2010 18:51:04 +0300

>      (submatch		. (rx-submatch 1 nil)) ; SRE
> +    (submatch-n		. (rx-submatch-n 2 nil))

I think better would be to allow the existing subform `submatch'
to support numbered groups, i.e. in addition to the current form
`(submatch SEXP1 SEXP2 ...)' also support
`(submatch N SEXP1 SEXP2 ...)' because the number is a parameter
of normal groups.

There are already subforms that support different number of integer
arguments like `(repeat N SEXP)' and `(repeat N M SEXP)'.  So the same
could be done for `submatch' too.

-- 
Juri Linkov
http://www.jurta.org/emacs/