From: Joost Diepenmaat <joost@zeekat.nl>
To: help-gnu-emacs@gnu.org
Subject: Re: ELisp: special read syntax for regular expressions?
Date: Tue, 15 Apr 2008 01:41:27 +0200 [thread overview]
Message-ID: <87tzi4uhqw.fsf@zeekat.nl> (raw)
In-Reply-To: fu0p9p$253u$1@agate.berkeley.edu
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/
next prev parent reply other threads:[~2008-04-14 23:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-05 11:17 ELisp: special read syntax for regular expressions? Ilya Zakharevich
2008-04-05 20:48 ` David Hansen
2008-04-06 3:18 ` Tim X
2008-05-04 1:38 ` David Combs
2008-04-06 9:35 ` Peter Dyballa
[not found] ` <mailman.10068.1207474538.18990.help-gnu-emacs@gnu.org>
2008-04-06 21:38 ` Ilya Zakharevich
2008-04-12 23:12 ` Peter Dyballa
[not found] ` <mailman.10316.1208041979.18990.help-gnu-emacs@gnu.org>
2008-04-12 23:34 ` Ilya Zakharevich
2008-04-12 23:36 ` Ilya Zakharevich
2008-04-09 22:43 ` Mike Mattie
[not found] ` <mailman.10052.1207428807.18990.help-gnu-emacs@gnu.org>
2008-04-14 23:27 ` Ilya Zakharevich
2008-04-14 23:41 ` Joost Diepenmaat [this message]
2008-04-15 1:51 ` Ilya Zakharevich
2008-04-15 4:24 ` David Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tzi4uhqw.fsf@zeekat.nl \
--to=joost@zeekat.nl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).