Jamie Zawinski writes:
Isn't it about time that XEmacs supported the
Perl/Python/Javascript regexp syntax? The world has moved on.
XEmacs should, yes.
Even if church dogma dictates that we still double-slashify all our
parens in Lisp code, Perl's simpler syntax could still be supported
for interactive commands.
I don't see why supporting alternative regexp syntax in code should be
a problem. We already support things like raw strings that the Church
of Cambridge does not.
The problem right now is finding somebody to do the work.
The other question is should we try to support pcre + Emacs
extensions, or just use the simpler syntax.
It's mostly the extra backslashing and lack of \s that drives me
crazy on a daily basis.
Interactively we already support single-slash input. Recent XEmacs
21.5 supports a raw string syntax. #r"stri\ng" for example is lexed
as a string with a single backslash and no line breaks. The
equivalent to "\s" in Emacs syntax is "\s-".
I imagine you know all that already; what I'm interested in here is
precisely what your requirement is. Less typing? Avoiding confusion
in the muscle memory?
I suppose a bound variable around re-search-forward, to indicate
the parsing style, would be the way to go. That, or a separate
function for new-style, like PHP does.
Bound variables can be a PITA deep in a function, and re-search-* are
used in a lot of code. I think separate functions, with a Ben-style
"behavior" for switching the keybindings, is the best implementation.
Or there could be a user customization, with re-search-* becoming
internal and the keys bound to re-search-*-command which consults the
option to determine which function to call.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta