From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: Re: ELisp: special read syntax for regular expressions? Date: Mon, 14 Apr 2008 23:27:53 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1208216481 11800 80.91.229.12 (14 Apr 2008 23:41:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2008 23:41:21 +0000 (UTC) Bcc: ilya To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 15 01:41:59 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JlYJC-0004FX-8M for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Apr 2008 01:41:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlYIX-0001oU-W9 for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Apr 2008 19:41:18 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!agate.berkeley.edu!ilya Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: powdermilk.math.berkeley.edu Original-X-Trace: agate.berkeley.edu 1208215673 70782 169.229.140.13 (14 Apr 2008 23:27:53 GMT) Original-X-Complaints-To: usenet@agate.berkeley.edu Original-NNTP-Posting-Date: Mon, 14 Apr 2008 23:27:53 +0000 (UTC) User-Agent: trn [how to get a version via %-escapes???] with a custom header X-How-To-Reach-Me: The From: address is valid X-How-To-Disable-Cc: Put in the headers the line: Mail-Copies-To: never Originator: ilya@powdermilk.math.berkeley.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:157924 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53290 Archived-At: [A complimentary Cc of this posting was sent to David Hansen ], who wrote in article : > > 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