[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ELisp: special read syntax for regular expressions?
From: |
Joost Diepenmaat |
Subject: |
Re: ELisp: special read syntax for regular expressions? |
Date: |
Tue, 15 Apr 2008 01:41:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:
> [A complimentary Cc of this posting was sent to
> David Hansen
> <david.hansen@gmx.net>], who wrote in article
> <mailman.10052.1207428807.18990.help-gnu-emacs@gnu.org>:
>> Have a look at the Gauche Scheme implementation. It has a regexp read
>> syntax: #/.../.
>
> IMO, having SLASH hardwired as a delimiter is a silly choice; it makes
> matching a slash harder, UNNECESSARILY. If one MUST hardwire some
> delimiters, it should better be () (since un-backwacked parens are
> almost guarantied to be matched inside a regular expression, one needs
> no extra backwacking to enclose the REx into MATCHED parens).
Agreed. From using loads of regexes in perl, I much prefer to use qr(
.. ) or qr{ ... }. Or at least, forward slashes in matches are just much
too common in many typical matches (URLs & paths, for instance). But you
would know that :-)
> Any thoughts? Is /(REX) prohibited by some considerations?
Dunno. I'd think that #{ ... } or #( ... ) or possibly even #r{ .. } or
#r( .. ) would be clearer as "special reader syntax". But I really don't
know enough about (emacs) lisp reader constructs.
> P.S. I just released v6.2 of CPerl mode; now it has a menu entry
> Perl/Micro-docs/Show-Faces which inserts an example Perl code
> with (all?) possible faces shown (when proper facification is
> enabled). This may simplify the part of this thread concerned
> with REx facification in CPerl.
>
> See ilyaz.org/software/emacs
That link doesn't seem to exist; it redirects to
http://www.yeah.com/software/emacs
Cheers,
Joost.
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Re: ELisp: special read syntax for regular expressions?, Mike Mattie, 2008/04/09
Message not available