GNU bug report logs - #6384
Teach rx explicitly numbered submatches

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Wed, 9 Jun 2010 17:25:02 UTC

Severity: wishlist

Tags: patch

Merged with 8776

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 6384 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6384 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#6384: Teach rx explicitly numbered submatches
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/




This bug report was last modified 14 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.