emacs-devel
[Top][All Lists]
Advanced

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

Re: Upcoming loss of usability of Emacs source files and Emacs.


From: Stefan Monnier
Subject: Re: Upcoming loss of usability of Emacs source files and Emacs.
Date: Thu, 25 Jun 2015 11:45:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I can't understand the doc string for macroexp-let2.
> Can anyone explain to me what this macro is supposed
> to do, and offer a concrete example of its use?

It abstracts the form:

   (let ((sym (make-symbol)))
     `(let ((,sym ,exp))
        ... ,sym ... ,sym ...))

used in macros to make sure that EXP is executed exactly one (and at
a known place with the right variables in scope), instead of the naive

     `(... ,exp ... ,exp ...))

which risks running EXP too many times, or at the wrong time, or the
other naive

     `(let ((val ,exp))
        ... val ... val ...))

which risks name capture if the `val' variable appears elsewhere.

> At this point, all I can say is that V is a metasyntactic variable,
> not literal Lisp code.  So it should be capitalized, not quoted.

That's right,


        Stefan



reply via email to

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