From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: Are there any problems with lexical-let or other cl-macros??? Date: Wed, 02 Jun 2010 13:26:56 +0200 Organization: Informatimago Message-ID: References: <5ad73987-3540-44a3-b4b1-b83c92d92526@q23g2000vba.googlegroups.com> <8c25a7d0-d094-457c-a004-be20b2d34a67@m33g2000vbi.googlegroups.com> <40978657-3509-4c0d-8526-edb492b90d6f@c11g2000vbe.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291825930 13289 80.91.229.12 (8 Dec 2010 16:32:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 16:32:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 17:32:06 2010 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.69) (envelope-from ) id 1PQMw2-00008G-83 for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 17:32:06 +0100 Original-Received: from localhost ([127.0.0.1]:46389 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQMw1-000824-He for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 11:32:05 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-X-Trace: individual.net 482TNWXS0FxhFG2RHw2RbgrBBWgsIIx+Mf2wGv1fjP5PBNFkXQ Cancel-Lock: sha1:NzdjZjBhOWQzZDY3MTJlOWIyNDJlN2VmZTI2ODcyYzAxN2I5ZjQ4NA== sha1:S9w6zZJ9AEDlInyEp4Y5oMok9KI= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/23.1 (darwin) Original-Xref: usenet.stanford.edu gnu.emacs.help:178557 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:75617 Archived-At: Helmut Eller writes: > * LanX [2010-06-01 17:58+0200] writes: > >> (please correct me if I don't get it right in my words) >> >> So defmacro is restricted to defining macros with "function syntax" - >> ie "(macro ...)" - while reader macros could be triggered by any >> character, opening the possibility to even extend the syntax to have >> special markup for different data structures? > > Yes right. defmacro defines a transformation from s-exps to s-exps. A > reader macro reads text from a stream and returns an s-exp. > >> Interesting... :) > > Reader macros have been used to write inline XML, SQL, and of course > Python or C like syntaxes, but the problem is that the editor (usually > Emacs) doesn't know how to indent reader macros. Also the read table > (the data structure which controls the reader) must be set up properly > before compiling; that complicates the build process and interaction > with other tools like the debugger. It's sometimes useful to parse data > files, but I never use reader macros in source files. That's just because your source programs have always dealt only with standard lisp objects. If you started to write a lisp program that would have to deal a lot with higher-level data types (ie. problem oriented data types), and you'd need to write often literals of that type, you would use profitably reader macros then. -- __Pascal Bourguignon__ http://www.informatimago.com