Menu

#26 unexpected %P scoping

open
nobody
5
2009-08-21
2009-08-21
Ken Keys
No

%P variables are changed by regexp uses in called macros. E.g.
/def foo = /test regmatch(".*", "foo")%; /echo %P0%; /bar%; /echo %P0
/def bar = /test regmatch(".*", "bar")
/foo
prints:
foo
bar

Complication: macros that use /split depend on this behavior. So if you change the %P scoping, you'll have to do something to make /split still work, like make it a builtin.

Discussion


Log in to post a comment.