From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Diepenmaat Newsgroups: gmane.emacs.help Subject: Re: ELisp: special read syntax for regular expressions? Date: Tue, 15 Apr 2008 01:41:27 +0200 Message-ID: <87tzi4uhqw.fsf@zeekat.nl> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208220054 21607 80.91.229.12 (15 Apr 2008 00:40:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2008 00:40:54 +0000 (UTC) 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 02:41:30 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 1JlZEf-00046X-Js for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Apr 2008 02:41:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlZE1-0007ZB-6R for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Apr 2008 20:40:41 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.news-service.com!news.astraweb.com!border2.a.newsrouter.astraweb.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!transit2.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAABgAAAAwBAMAAAD5pqeQAAAAAXNSR0IArs4c6QAAABhQTFRF URgKoyIAmTMXqF5KuYl7y6ui4NDM+/r4zJNdmwAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsT AQCanBgAAAAHdElNRQfXDBIUAgGiEa2aAAABYUlEQVQoz02SvXaDMAyF3aHdZegD2PxkJhQ8J4R6 juGUuZDUe43R61eGJA0D8B1dXV0LGCJaDDePyOjZBtT9MgSYbIu+UpNl2A+/ukPXfNUku2ROdWhM 99myqzWX3Czp8dhY1n+MfWau+X4fZGNZpecuSwpFMHOZnpskFppgEaksGs5lFoYeYilOEMkjzcGC CzjxJJoowZIAQMPhfdYEecGhBFCOwO9GKkFkXZDtfIAax2C9wwKAWzwFyPGwQrXCIkimbzAHeFtl Ts0vJHvFkRI01ssVwpyMAoHkGmfFqL+TEmSNXjHMXeiHZAjZqjOsVxxSV8UG3Fi2ZGID2Fs2t7d3 6mLTdIdUM+PuECvW/T6gfobnSqTY+DDgmrnmATSnfMiQrTvcDOikyT1OWHxZPIF8As8P/waOjzdn IGt+vRVgYD7CrakFTSfFbwAB0Y+ghWj0IjP0Scz6I2E3zIlFb/8AfR6DwKVgwNYAAAAASUVORK5C YII= Cancel-Lock: sha1:oLPP1PTHlC72QDwtKbPD/1IWTo0= Original-Lines: 41 Original-NNTP-Posting-Host: 80.126.3.69 Original-X-Trace: 1208216488 news.xs4all.nl 14352 [::ffff:80.126.3.69]:58536 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: shelby.stanford.edu gnu.emacs.help:157925 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:53291 Archived-At: Ilya Zakharevich writes: > [A complimentary Cc of this posting was sent to > David Hansen > ], who wrote in article : >> 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/