[lug] XEmacs quoting madness!
Tom Tromey
tromey at redhat.com
Mon Aug 20 14:43:05 MDT 2001
>>>>> "Tkil" == Tkil <tkil at scrye.com> writes:
Tkil> (while (re-search-forward "Can\\\\'t" (point-max) t)
Tkil> ...)
Tkil> just as an aside, this is a place where you really start
Tkil> noticing the tradeoffs between regular, consistent,
Tkil> easy-to-parse languages (like lisp, python, tcl) and nasty,
Tkil> irregular, special-case-all-over-the- place languages (like
Tkil> perl).
I'm no fan of perl syntax! But regular expressions are one place that
Perl made some nicer decisions than Emacs did.
For instance in Perl you simply use `(.|.)' to do submatches with
alternation. In Emacs you must use `\(.\|.\)' -- thus requiring extra
quoting for the backslashes. Worse, Emacs functions like
query-replace-regexp expose this to the user.
Tom
More information about the LUG
mailing list