On Feb 25, 2008, at 00:53 , Tanaka Akira wrote:

>> Isn't it the current behavior?
>
> (c != '\\' || c != term) is same as
> (c != '\\' || term != '\\').
>
> So the condition is always true except term is '\\' as:
> %r\abc\.
>
> However tokadd_escape is not called if term is '\\' because
> tokadd_string tests c == term for termination before calling
> tokadd_escape.
>
> So, (c != '\\' || c != term) is always true.

Right... that was what I was confused by, and I read the intent as  
wanting to escape for '/' if using the %r form.

I prefer your latest patch. It is cleaner and more consistent, even if  
the inspects are more verbose.