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

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

Re: Are there any problems with lexical-let or other cl-macros???


From: Helmut Eller
Subject: Re: Are there any problems with lexical-let or other cl-macros???
Date: Wed, 08 Dec 2010 15:10:59 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

* 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.

Helmut


reply via email to

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