[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: symbol-macrolet clobbers (match-data), bug or feature?
From: |
Richard Stallman |
Subject: |
Re: symbol-macrolet clobbers (match-data), bug or feature? |
Date: |
Wed, 15 Aug 2007 21:08:15 -0400 |
This is an interesting idea, but I'd rather it be implemented in a way
that does not require loading CL, and not using symbol-macrolet.
One way to do that is to write a list of variables to bind to certain
match values, like this:
(r=~ "\\(abc\\)\\(efg\\)?" "abcefg"
((s0 b0 e0) (s1) (s2))
(list (match-data) b0 e0 s0 s1 s2))
which would be equivalent to your
(r=~ "\\(abc\\)\\(efg\\)?" "abcefg"
(list (match-data) <0 >0 $0 $1 $2))