>>>>> "WP" == Walter C Pelissero <walter@pelissero.org> writes:
WP> I was wondering if I got the sre manual right.
WP> According to the only example I could find in it
WP> (let-match (regexp-search date s) (whole-date month day year)
WP> ... body ...)
WP> if-match should bind variables like this
WP> (whole-matched-string substring-1 substring-2 ...)
WP> while according to my test it's like this
WP> (match-structure whole-matched-string substring-1 substring-2 ...)
WP> It's the first time I use if-match, though.
Documentation and implementation already differ for let-match:
In
(let-match (regexp-search date s) (whole-date month day year)
... body ...)
according to the manual whole-date is bound to the matching string
whereas the implementation binds it to the match value itself. ifmatch
somewhat inherits this behaviour as you observed.
Unfortunately the implementation for let-match and if-match don't work
together very well, so I suspect we have to change implementation and
documentation.
The only one who knows the intended behaviour is Olin. Maybe he will
tell us what to do, maybe not. I predict that the latter will
happen...
--
Martin
|