help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ELisp: special read syntax for regular expressions?


From: Ilya Zakharevich
Subject: Re: ELisp: special read syntax for regular expressions?
Date: Mon, 14 Apr 2008 23:27:53 +0000 (UTC)
User-agent: trn [how to get a version via %-escapes???] with a custom header

[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>:
> > I think I know the answer: one needs to allow a special read syntax
> > for regular expressions (the result being an ordinary string).  This
> > way one can avoid the acute backslashitis [by inverting \( and (,
> > etc], the regular expressions may be specially indented, and the
> > syntax highlighter would have a chance to remove most of the remaining
> > complexity by proper highlighting (similar to CPerl one).
> >
> > What do you think?
> 
> 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).

Any thoughts?  Is /(REX) prohibited by some considerations?

Yours,
Ilya

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]