"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
I think I would prefer that flags be (an) argument(s) to the regexp
translator, or use the Python "(?FLAGS)" syntax in the string. But
I'm admittedly biased toward Python vs. Perl. Another possibility
would be to have Perl-style regexps be delimited within the string:
#r"/foo \s+ bar/x"
[...]
> True. case-fold-search is an analogous precedent, but that
doesn't
> necessarily make it a good idea.
I had forgotten about case-fold-search. It is, indeed, kinda annoying
to have to slap case-fold-search around various bits of code. Having
the flags actually be in the regexp itself would increase readability, I
think. (I mean, if you see #r"/foo/i" (or whatever) you know
immediately that it's case-insensitive, and don't have to have to read
upwards in the code to see what case-fold-search is at that point.)
Would this be possible to use interactively, in any way? I mean, if you
say (urrr, let's see)
C-u C-s /foo/u
you get the case-sensitive version of the search?
I mean, obviously not like that, but with a smarter syntax. :-)
C-u C-s ?r/foo/u
Eh. I don't know. Just contributing to the randomness. :-)
--
(domestic pets only, the antidote for overdose, milk.)
larsi(a)gnus.org * Lars Magne Ingebrigtsen
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta